fixed error with memory leaking on eventEmitter.addEventListener