GlobalChi2 function for many histograms in ROOT::Fit::Fitter::FitFCN

Hi,
I get this:

1
root.exe: /builddir/build/BUILD/root-6.22.02/math/mathcore/src/BinData.cxx:235: ROOT::Fit::BinData& ROOT::Fit::BinData::operator=(const ROOT::Fit::BinData&): Assertion `Opt().fIntegral' failed.

When I do:

   std::vector<ROOT::Fit::BinData> data;cout << 1 << endl; 

   for(int k=0;k<N;k++){ data.push_back(ROOT::Fit::BinData(opt,range1[k])); cout << k << endl; }
   for(int k=0;k<N;k++){ data.push_back(ROOT::Fit::BinData(opt,range2[k])); cout << k << endl; }
   for(int k=0;k<N;k++){ data.push_back(ROOT::Fit::BinData(opt,range3[k])); cout << k << endl; } 

I think the same error was reported some time ago and fixed, but it seems that its there again…
Cheers,