fix crash on second click photo button