Sort sequence fix