Correct array indexing in test