Fixed bug with name generation

Name now cannot repeat