Fixed windows build errors