A couple fixes for Windows