Fixed 3d transformation bug