Fixed 3D bounding box checks.