fixed defects in graph cuts