Fix bounding box bug