fix some bugs in client