fix the sort to be numeric and on the right fields