clamp bounding box size to fix crashes