Fixed rotation issue so that app no longer works in rotated position