fix overwriting existing items during update