Fixed when sort length is 1 algo returns -1