code fix for photo change