fixed a bug in client.