fixed freezing on Windows
Merge pull request #1 from johnmoore/master

fixed freezing on Windows