corrects typo from indices to matches.