windows compatibility fixes