Fix data sorting.