Sortdata for with index fix 2