fix sorter_smart