Fix Windows bugs.