modified view to close popup window after closing