fixed image_update function