Changes to support running on Win