Make sure the records are sorted by seq