Add basic cancel support to rpc client. Fix error