Update proxy.py

Some fixes