Some of this code is only needed for backward compatibility - it can be removed when we break compatibility for 1.0.