fixed rpc function call