fix call removeAllListeners on null object