Fixed bug in MaxFlow