Fix the problem of sequence direction