Added an option to combine rectangles.