correctly handling serviceName registration