Fix issue with checking if name exists