Fix bug with photo downloading