fix bug that the selected matched item is wrong.