fix indexing.