1. fixed performance issue of accessing cached result from mongodb; 2. tweak fix_db_indexes script, move some code to be only run as main