this should fix a crash when the searchbar is about to be hidden