Change the procedure of the stretching image and fix some error of the Stretching function