fix popupwindows bug