Kept getting an indexing error