fix event api bug