fix bug for bounding box and image scale