fix insert to update