Fix windows warnings

Fix a slew of windows warnings.