Fixups for Windows based on batlab tests. #4465