fixed some small bugs in client daemon