Refactored source code if duplicate name exists.