better handling of graph of single node