modify a bug in cut_img