Adapt to mgo api.