Small fixes for MongoDB.