Fixed for windows and MinGW