Fix some bugs in client