Fix hiding the search bar.
Wait for other events to finish, by dispatching the hide method to the main queue.