Fixed Windows bugs in tests.