Fixed bug that caused duplicate names