sequence and ending fixes