fixed some windows build problems