fixing window switching on ios7