Fixed a bug in sort.cnt