bugfixes in reindex_mongo_database