fix a bug for bg_box