Fix customevents definition