solved the rotation bug