Repair many-to-many insertation