Fixed a nasty crash in client.py.