fix indexing issues!