Fix search event handling