fix bug: exsits pattern broken