Sort order consistent and starting from 0
Merge pull request #552 from albertogasparin/fix-sort-order

Sort order consistent and starting from 0