fixed segfault during test on Windows