fix upsert mechanism