fixed bug in window switching