Fixed the demos to handle Alt+F4 correctly