fix error message when event handler is missing