changed exit_on_close to dispose_on_close