vtkLineSource in glyph3D wrong resolution

Hi all,
I am trying to create glyph3D passing a source composed by two spheres and a line. However when I add the vtkLineSource to the sources, the resolution is wrong: (VTK 9.2)

image

Instead when I don’t add the line to the sources the resolution is fine:
image

How can I fix this? Here is my code:

// Create the sources:
std::vector<vtkSmartPointer<vtkPolyDataAlgorithm>> sources;
// Line source 
// comment these lines to obtain the second image --------------
auto* lineS = vtkLineSource::New();
lineS->SetResolution(25);
lineS->SetPoint1(m_startPoint.x, m_startPoint.y, m_startPoint.z);
lineS->SetPoint2(m_endPoint.x, m_endPoint.y, m_endPoint.z);

auto lineSource = vtkSmartPointer<vtkLineSource>::New();
lineSource.TakeReference(lineS);
sources.push_back(lineSource);
//-------------------------------------------------------------------------
// Sphere source 1
auto* sphereStart = vtkSphereSource::New();
sphereStart->SetPhiResolution(12);
sphereStart->SetThetaResolution(12);
sphereStart->SetCenter(m_startPoint.x, m_startPoint.y, m_startPoint.z);
sphereStart->SetRadius(m_radius);

auto sphereStartSource = vtkSmartPointer<vtkSphereSource>::New();
sphereStartSource.TakeReference(sphereStart);
sources.push_back(sphereStartSource);
// Sphere source 2
auto* sphereEnd = vtkSphereSource::New();
sphereEnd->SetPhiResolution(12);
sphereEnd->SetThetaResolution(12);
sphereEnd->SetCenter(m_endPoint.x, m_endPoint.y, m_endPoint.z);
sphereEnd->SetRadius(m_radius);

auto sphereEndSource = vtkSmartPointer<vtkSphereSource>::New();
sphereEndSource.TakeReference(sphereEnd);
sources.push_back(sphereEndSource);

// Create the glyph3D
vtkNew<vtkAppendPolyData> appendData;

for (auto source : sources)
{
	appendData->AddInputConnection(source->GetOutputPort());
}

auto* glyph3D = vtkGlyph3D::New();
glyph3D->SetColorModeToColorByScalar();
//glyph3D->SetIndexModeToScalar();
glyph3D->SetSourceConnection(appendData->GetOutputPort());
glyph3D->SetInputData(data);
glyph3D->SetScaleFactor(scaleFactor);
glyph3D->Update();

(the issue persists with VTK version 9.3)
Thank you,
C.R.