fix window pop up issue