Fixed the rotation bug along the sides

- No longer glitches when rotating against sides