Popups now close without exiting the program