Fix tail/head and reverse line order