Fix bugs in name translation.