Fix a warning and an error

Happened because I compiled on windows and it only compiled
windows-specific code.