Fixed transformation bugs