fix small bugs in client