fixed behavior when name is empty