edit photo works correctly