Fix for rotation bug