Fixed a rotation bug