fixed the bugs of not rotating