Fix Max-flow going an extra time through while loop