Added support for overlapping boxes.