Change RouteCommand.Node.cost to totalCost and use position 3 for second output terminal