Fix for the fullscreen toggling issue in iOS

This should fix #166