Fixed rotation bug, fixes #28.