Few Windows compatibility fixes