Fix bounding box calculation.