proxy and client cleanup