Improve bounding box test to check for sizes