Patching condition to be more exact and not just check one edge