Fixed defect in patternset matching