Changed the order in which certain transformations should be applied.