Improve sorter_length behavior