Fix sequence length updating.