Issues with array indexing.