general: fixed a few MinGW issues