Fixed for mingw