Some modification of get_name.