fix bug TypeError: Cannot call method 'removeListener' of undefined