fixes in client.py