fix dinic bug