Make app-quit work properly.