GDI+ Window preventing to shut down fix