delete sleep fixes bug in reduce_db.py