fixes for 7310f557aa9016693da6deac9915eaedea660e71 on windows