fix bugs in patternListMatcher