Issue with array indexing.