Fixed Compilation issue on windows
Fixed issue where closing a MINX window would not exit the program.