Update event handler.