fixed a switching of windows in menu