Added check for doubles in photoService.