Fix name_attribute and id_attribute methods