fix bug for missing match char