Fixed the indexing error.