Fix bug related to fullscreen mode