Fixed the degenerate case of empty bounding box