fix photo api bug