Fixed auto rotating bug