fix some bug with index unique in array
Merge pull request #2 from minsh/jon

fix some bug with index unique in array