fixed a couple things so the photos are saved properly