Some changes to support legendary-node