fixes and for mingw