Reworking core files to accomodate new version of MongoDB