Fix minor Mongo-related problems