Fix end of sequence.