Corrected for MinGW 4.8