Sorting and stats structure minor changes again