Fixed bug with iPad rotation