prevent hangings on Windows in some cases
Merge pull request #1 from chorny/master

prevent hangings on Windows in some cases