fixes on mingw