fixed statistics sort