regular expression bug fix