fixes a bug in the DFG construction