Merge branch 'pt/mingw-misc-fixes'