Compatability fixes for Windows OS