Correction of the sorting algorithm.
Correction of the line counting.