changed handling for rpc error handling
new version