Fix nil return from rpc call