changed how the closing of the photo activity works