Fix duplicate inserts.