Correct logic errors with mingw64 extraction