bug: fix indexing