end of image saving bug