fixed some small bugs in client