Rotation matrix bugfix