MinGW adaptation (buggy)