Fixed some stuff for windows build.