Proxy handling fixes