upsert fix