clone data before insert or update fix