diff --git a/Code/Radiometry/otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms.cxx b/Code/Radiometry/otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms.cxx
index 501a7a24d157e9d4427df86440d9ac8554117a80..b93ea26f514b01d8bbc700dd2186531775d573b6 100644
--- a/Code/Radiometry/otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms.cxx
+++ b/Code/Radiometry/otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms.cxx
@@ -138,6 +138,7 @@ void
 AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms
 ::GenerateData()
 {
+
   AtmosphericCorrectionParametersPointer input = this->GetInput();
   AtmosphericRadiativeTermsPointer output = this->GetOutput();
 
@@ -158,7 +159,7 @@ AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms
   
   for (unsigned int i=0; i<NbBand; ++i)
   {
-         atmosphericReflectance = 0.;
+    atmosphericReflectance = 0.;
     atmosphericSphericalAlbedo = 0.;
     totalGaseousTransmission = 0.;
     downwardTransmittance = 0.;
@@ -192,6 +193,7 @@ AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms
       upwardDiffuseTransmittanceForAerosol             /** Upward diffuse transmittance for aerosols */
     );
 
+
     output->SetIntrinsicAtmosphericReflectance(i, atmosphericReflectance);
     output->SetSphericalAlbedo(i, atmosphericSphericalAlbedo);
     output->SetTotalGaseousTransmission(i, totalGaseousTransmission);
diff --git a/Code/Radiometry/otbReflectanceToSurfaceReflectanceImageFilter.txx b/Code/Radiometry/otbReflectanceToSurfaceReflectanceImageFilter.txx
index c8c446071348e6acadeb1a71c71f1202e8bc663f..c8fe6673dcda11380b293f7b20fb2f1622815d38 100644
--- a/Code/Radiometry/otbReflectanceToSurfaceReflectanceImageFilter.txx
+++ b/Code/Radiometry/otbReflectanceToSurfaceReflectanceImageFilter.txx
@@ -94,7 +94,7 @@ ReflectanceToSurfaceReflectanceImageFilter<TInputImage,TOutputImage>
       m_CorrectionParameters->LoadFilterFunctionValue( m_FilterFunctionValuesFileName );
    }
   // the user has set the filter function values
-  else
+  else if( m_CorrectionParameters->GetWavelenghtSpectralBand().size() != this->GetInput()->GetNumberOfComponentsPerPixel())
     {
       bool ffvfOK = true;
       if( m_FilterFunctionCoef.size() == 0 )
@@ -105,23 +105,22 @@ ReflectanceToSurfaceReflectanceImageFilter<TInputImage,TOutputImage>
       for(unsigned int i=0; i<this->GetInput()->GetNumberOfComponentsPerPixel(); i++)
        {
          FilterFunctionValuesType::Pointer functionValues = FilterFunctionValuesType::New();
-         // if no ffvf set, set 1 as coef
+
          if(ffvfOK)
            functionValues->SetFilterFunctionValues(m_FilterFunctionCoef[i]);
-       
-         functionValues->SetMinSpectralValue(imageMetadataInterface->GetFirstWavelengths(dict)[i]);
-         functionValues->SetMaxSpectralValue(imageMetadataInterface->GetLastWavelengths(dict)[i]);
-
-         // if no ffvf set, compute the step to be sure that the valueswavelength are between min and max
-         if(!ffvfOK)
-           functionValues->SetUserStep( functionValues->GetMaxSpectralValue()-functionValues->GetMinSpectralValue()/2. );
+	 else // if no ffvf set, compute the step to be sure that the valueswavelength are between min and max and 1 as coef
+	   {
+	     functionValues->SetMinSpectralValue(imageMetadataInterface->GetFirstWavelengths(dict)[i]);
+	     functionValues->SetMaxSpectralValue(imageMetadataInterface->GetLastWavelengths(dict)[i]);
+	     functionValues->SetUserStep( functionValues->GetMaxSpectralValue()-functionValues->GetMinSpectralValue()/2. );
+	   }
        
          m_CorrectionParameters->SetWavelenghtSpectralBandWithIndex(i, functionValues);
        }
+     
     }
-  
+
   Parameters2RadiativeTermsPointerType param2Terms = Parameters2RadiativeTermsType::New();
-  
   param2Terms->SetInput(m_CorrectionParameters);
   param2Terms->Update();
   m_AtmosphericRadiativeTerms = param2Terms->GetOutput();
diff --git a/Code/Radiometry/otbSIXSTraits.cxx b/Code/Radiometry/otbSIXSTraits.cxx
index 543cef59d0452e2156edc07fb2b52c946bf69ca5..3c139d10fc54d34e6ed59b6bc401dbe9f1303cdd 100644
--- a/Code/Radiometry/otbSIXSTraits.cxx
+++ b/Code/Radiometry/otbSIXSTraits.cxx
@@ -111,6 +111,7 @@ SIXSTraits::ComputeAtmosphericParameters(
       s[cpt] = FilterFunctionValues6S[i];
       cpt++;
     }
+
     // Call 6s main function
     otbMsgDevMacro(<< "Start call 6S main function ...");
     otb_6s_ssssss_otb_main_function(        &asol, &phi0, &avis, &phiv, &month, &jday,