fix the regexps bugs