fix a problem with incomplete graphs.