Fix #4 Endless loop on windows