fix insert on duplicate key