fix bug for EventEmitter