fix output of nodes and edges