Fix some minor issues in EventEmitter class.