More fixes for mongodb