Fix bug when resizing window after switching views (not perfect, but works)