diff --git a/methods/Method_D.cpp b/methods/Method_D.cpp
index 83828ed9b1fa40dd0b39e3186b77bdb1328dae2c..cbe274c0aab12603c22ff4a7e346051fff9bf1d1 100644
--- a/methods/Method_D.cpp
+++ b/methods/Method_D.cpp
@@ -76,7 +76,15 @@ bool Method_D::Process (const PedData& peddata,const std::string& scriptsLocatio
      int minFrame = peddata.GetMinFrame();
      if(_startFrame!=_stopFrame)
      {
-         	 for(std::map<int , std::vector<int> >::iterator ite=_peds_t.begin();ite!=_peds_t.end();ite++)
+         	 if(_startFrame==-1)
+         	 {
+         		_startFrame = minFrame;
+         	 }
+         	 if(_stopFrame==-1)
+         	 {
+         		_stopFrame = peddata.GetNumFrames()+minFrame;
+         	 }
+    	 	 for(std::map<int , std::vector<int> >::iterator ite=_peds_t.begin();ite!=_peds_t.end();ite++)
          	 {
          		 if((ite->first + minFrame)<_startFrame || (ite->first + minFrame) >_stopFrame)
          		 {
@@ -125,7 +133,7 @@ bool Method_D::Process (const PedData& peddata,const std::string& scriptsLocatio
           }
           int NumPeds = IdInFrame.size();
           //---------------------------------------------------------------------------------------------------------------
-          if(NumPeds>2)
+          if(NumPeds>3)
           {
         	  if(_isOneDimensional)
         	  {