fix the error of length of match