make sure the indices are sorted in the same order as the values
Merge branch 'release_master' into parameterized