repository: free fields before overwriting them