fix typos and mislabeled indexing