Updated client.py. Fixed threading issue.