Some tweaks to event handlers.