fix edge cases when marking interior trapezoids