Fix to image saving