Minor bugfix for 3D transformations