Fixed bug where rotating one of the objects near the right edge would cause a crash