Use upsert instead of insert to prevent exact dupes

Simple change