Set the nid