Replace index=0 with index<=0 to fix out of bounds exception
IDEX-1257
Merge pull request #5 from mleduque/IDEX-1257

Replace index=0 with index<=0 to fix out of bounds exception