Minor fix to graph edge handling for directed graphs