bugfix: perform matches in the right order

Created by  Kartik K. Agaram  on September 18, 2022
6DYSB5DYWZJ2MRV3O7EZHMDWJFD5QN2TECWJFSRQESMKFDXSPLCAC
Change contents