Fix a few minor bugs involving bounding boxes.