fixes in proxy handling