fire close handler when popup is hidden
fix popup close handler