fix for rpc promise rejection