Turns out SortArray was for 2d Arrays. Made 1D Array sort.