Amend valid bounding box judgement logic.