Fixed proxy support in python 3 environment