Addressing a bug when toggling full screen mode