fixed a bug where new flow networks had duplicated edges