fix missing condition in lsort