Fix rotate screen bug