use correct parameter for CustomEvent constructor