Fixed a bug with getRotation()