Fixed rotations more than 360 degrees

Made it unable to rotate object more than 360 degrees