Trying to fix photo overwriting