changed from dispose_on_close to exit_on_close