Even Alt + F4 crashes so I think there is some problem in the cleanup of your code.