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

IDEX-1257