Updated extend to Bounding box in script