Possibly fixed indexing issue