fixed bug in portrait-mode tilt code