fix condition in lsort