do workaround when QuitPre event doesn't exist (issue #7)