Fixed small indexing error