duplicate insert fix