fixed a recursion bug in proxy.py