Adding proxy handling