Protects windows program from exiting