Fixed some issues in client.