diff --git a/Code/BasicFilters/otbCountImageFilter.txx b/Code/BasicFilters/otbCountImageFilter.txx
index 016674514e274dcf4546fb6d5428ec1f62058677..d03536bbef8ab6e875e0621e64f2d75d201512bb 100644
--- a/Code/BasicFilters/otbCountImageFilter.txx
+++ b/Code/BasicFilters/otbCountImageFilter.txx
@@ -71,8 +71,6 @@ CountImageFilter<TInputImage, TDetector, TCount, TOutputImage >
     itk::ImageRegionIterator<OutputImageType> 
                        itOutput(outputImage, outputImage->GetLargestPossibleRegion());
     
-    CountMethodType    CountMethod;
-    
     itInput.GoToBegin();
     itOutput.GoToBegin();
     
diff --git a/Code/FeatureExtraction/otbSiftFastImageFilter.txx b/Code/FeatureExtraction/otbSiftFastImageFilter.txx
index 342533fd76c62f343a8367eaa89c6fd16201a5a3..04f677069f618cc9e075f5f964c19389f6524376 100755
--- a/Code/FeatureExtraction/otbSiftFastImageFilter.txx
+++ b/Code/FeatureExtraction/otbSiftFastImageFilter.txx
@@ -43,13 +43,11 @@ namespace otb
   SiftFastImageFilter<TInputImage,TOutputPointSet>
   ::GenerateData()
   {
+    
     // Get the input image pointer
     const InputImageType *     inputPtr       = this->GetInput();
     OutputPointSetPointerType  outputPointSet = this->GetOutput();
-
-   
-
-
+    
     typename InputImageType::SizeType size = inputPtr->GetLargestPossibleRegion().GetSize();
 
     // Rescale data in the [0,1] range
diff --git a/Code/FeatureExtraction/otbSimplePointCountStrategy.h b/Code/FeatureExtraction/otbSimplePointCountStrategy.h
index 693ed129b6f37ded934e28066a308676a8e44c71..d5a8953d36db67b95a5b21ec9a07ec42f71fd5a5 100644
--- a/Code/FeatureExtraction/otbSimplePointCountStrategy.h
+++ b/Code/FeatureExtraction/otbSimplePointCountStrategy.h
@@ -48,23 +48,27 @@ public:
       
       int accu = 0;
       double surface = M_PI*size*size;
-
-      typedef typename TPointSet::PointsContainer::ConstIterator         iteratorType;
-      
-      iteratorType it = pointSet->GetPoints()->Begin();
       
-      while( it != pointSet->GetPoints()->End())
+      if(pointSet->GetNumberOfPoints() != 0)
 	{
-	  float distX2 =( index[0]-it.Value()[0])*( index[0]-it.Value()[0]);
-	  float distY2 =( index[1]-it.Value()[1])*( index[1]-it.Value()[1]);
-	  float dist = vcl_sqrt(distX2 + distY2);
+	  typedef typename TPointSet::PointsContainer::ConstIterator     iteratorType;
+	  iteratorType it = pointSet->GetPoints()->Begin();
 	  
-	  if(dist <= size)
-	    accu++;
+	  while( it != pointSet->GetPoints()->End())
+	    {
+	      float distX2 =( index[0]-it.Value()[0])*( index[0]-it.Value()[0]);
+	      float distY2 =( index[1]-it.Value()[1])*( index[1]-it.Value()[1]);
+	      float dist = vcl_sqrt(distX2 + distY2);
+	      
+	      if(dist <= size)
+		accu++;
 	  
-	  ++it;
+	      ++it;
+	    }
 	}
-            
+      else
+	return 0.;
+
       return static_cast<float>(accu/surface);
     }
 };