Fixed getPhoto method