Fix bug of the name for duplicates too