fixing recursive index call when routing