fix bug of display of nodes in the graph