Windows compat changes. Untested