windows build, minor fixes for win