added more strict valid bounding box condition