fix bug instant upload of image