improve listener removal for proxies