Get index ordering correct