Fix small indexing error