Changes to switch-window