Fix repeat of line encoding