fixed a small bug in min_cut_