fix looking up index endpoint