Fix scope error in PhotoFactory