fix i indexing not working, causing a trace abort