Small changes to fix issues found on Win32