A fix for the iOS orientation change bug.