compatibility fixes for windows