add clear button in search and fix crash on apostrophe search