Fix #2167 on Windows
Merge pull request #2267 from ghostoy/master

Fix #2167 on Windows