fix to db_stats