fix PatternHandler