Fix effects of insert_with.
Fix type error in insert_with.