fixing connection event listener from giving listener leak warning