Fix defect wrong rectangles overlap.