Correct indexing error