Made photo and gallery save() better