Help with Rotation

In a new game I’m making I’m trying to get an object to rotate when you press the right or left arrows, but it rotates at the top left so it’s really hard to control. Is there any way to fix this?
http://flowlab.io/game/view/1034145

Nevermind it fixed itself somehow