Fix bug with restoring maximize state of window after fullscreen mode