fix sort order for statistics