fixes a bug when a name is not specified