fixed summarize_db.py