fix popup window close event