Fix sequnce correctness problem