Fixed the rotate issue

Just some small changes.