Fix broken indexing.