fixed freezing on Windows