fixed case where align would fail on last line

Previously trying use the alignment feature on the last line deleted the
last line.