fix rotation to portrait bug