a correction of the previous sorting