Add NameId if not present