Add setHandledEventTypes() and fix exception