Fix Windows compat errors