fix bug(pattern 0 return false)