preformance fix for RegexpCheck