fix for pymongo performance too slow