Fix more windows compatibility issues