Fixed broken image saving