fixed "ReferenceError: listener is not defined"