various fixes for the Windows Build