stats now returns empty array on query error