Fix windows warnings and errors.