Corrects swapped lines