Minor event handler improvements