fix indexing so that it applies to the node, not its children