fix startup in mingw