Fix bug with array index