corrected pinch logic