small regex match bug fix