fixed crash on Windows closes #3