regex bug fix