Fixed the device rotation issue.