CAP-1695 windows compatibility fixes