Fix failing tests on Windows