Fix transformation bug