Fixed indexing error.