changed exit logic, showing popup and popup include