Fixed the rotation bug.