RPC code in case something happens