Compatibility with new mongodb version