cleanup of custom event handlers