fix the bug of cancel button in the search bar