Fix two Windows-related issues

Two commits because there were two separate issues...