diff --git a/methods/Method_A.cpp b/methods/Method_A.cpp
index 1c9d9b0351494b8b7e31e922dfdfe864dbe60b04..f4c40cf18562050f13472dcc7c7dfce646b65121 100644
--- a/methods/Method_A.cpp
+++ b/methods/Method_A.cpp
@@ -123,7 +123,7 @@ void Method_A::WriteFile_N_t(string data)
           string file_N_t ="Flow_NT_"+_trajName+"_id_"+_measureAreaId+".dat";
           if(_plotTimeSeries)
           {
-			  string parameters_N_t="python \""+_scriptsLocation+"/_Plot_N_t.py\" -p \""+ METHOD_A_LOCATION + "\" -n "+file_N_t;
+			  string parameters_N_t="python3 \""+_scriptsLocation+"/_Plot_N_t.py\" -p \""+ METHOD_A_LOCATION + "\" -n "+file_N_t;
 			  int res = system(parameters_N_t.c_str());
 			  Log->Write("INFO:\tPlotting N-t diagram! Status: %d", res);
           }
diff --git a/methods/PedData.cpp b/methods/PedData.cpp
index 4c8311c21d6526574e8beb87ba8016c01ef643f2..41dd70fc57a8ea01d4c021678933bcb3f2718168 100644
--- a/methods/PedData.cpp
+++ b/methods/PedData.cpp
@@ -567,7 +567,7 @@ vector<int> PedData::GetIdInFrame(int frame, const vector<int>& ids, double zPos
      return IdInFrame;
 }
 
-double PedData::GetInstantaneousVelocity(int Tnow,int Tpast, int Tfuture, int ID, int *Tfirst, int *Tlast, ub::matrix<double> Xcor, ub::matrix<double> Ycor) const
+double PedData::GetInstantaneousVelocity(int Tnow,int Tpast, int Tfuture, int ID, int *Tfirst, int *Tlast, const ub::matrix<double> & Xcor, const ub::matrix<double> & Ycor) const
 {
      std::string vcmp = _vComp(ID,Tnow);
      double v=0.0;
@@ -628,7 +628,7 @@ double PedData::GetInstantaneousVelocity(int Tnow,int Tpast, int Tfuture, int ID
      return fabs(v);
 }
 
-double PedData::GetInstantaneousVelocity1(int Tnow,int Tpast, int Tfuture, int ID, int *Tfirst, int *Tlast, ub::matrix<double> Xcor, ub::matrix<double> Ycor) const
+double PedData::GetInstantaneousVelocity1(int Tnow,int Tpast, int Tfuture, int ID, int *Tfirst, int *Tlast, const ub::matrix<double> & Xcor, const ub::matrix<double> & Ycor) const
 {
      std::string vcmp = _vComp(ID,Tnow);  // the vcmp is the angle from 0 to 360
      if(vcmp=="X+")
diff --git a/methods/PedData.h b/methods/PedData.h
index 5d644f1368b1901b7bf27d37b015eb542f6a8460..4b174a4979ee0970e70d889a593f60dfb9daf45a 100644
--- a/methods/PedData.h
+++ b/methods/PedData.h
@@ -81,8 +81,8 @@ private:
      bool InitializeVariables(const std::string& filename);
      bool InitializeVariables(TiXmlElement* xRootNode);
      void CreateGlobalVariables(int numPeds, int numFrames);
-     double GetInstantaneousVelocity(int Tnow,int Tpast, int Tfuture, int ID, int *Tfirst, int *Tlast, ub::matrix<double> Xcor, ub::matrix<double> Ycor) const;
-     double GetInstantaneousVelocity1(int Tnow,int Tpast, int Tfuture, int ID, int *Tfirst, int *Tlast, ub::matrix<double> Xcor, ub::matrix<double> Ycor) const;
+     double GetInstantaneousVelocity(int Tnow,int Tpast, int Tfuture, int ID, int *Tfirst, int *Tlast, const ub::matrix<double> & Xcor, const ub::matrix<double> & Ycor) const;
+     double GetInstantaneousVelocity1(int Tnow,int Tpast, int Tfuture, int ID, int *Tfirst, int *Tlast,  const ub::matrix<double> & Xcor, const ub::matrix<double> & Ycor) const;
 
 private: