Handle empty and duplicated name for modification now.