Reverted get_stats from db