fix the previous commit.
handle with the situation when there is only one search result.