fix for windows, add test case