Fix a problem with UserQuitEvents