Fix bug of event trigger.