diff --git a/ols.cc b/ols.cc
index 957311091c564266daec8ef9dcb45746ef2ce315..be2b54fd859a32f333122220ffc76caca9d6130f 100644
--- a/ols.cc
+++ b/ols.cc
@@ -194,13 +194,15 @@ namespace SIGPROC {
 	      // e is the estimate of the variance of the timeseries, sigma^2
 	      Matrix varmat = (r.Columns(batch_pos, numTS).t()*r.Columns(batch_pos, numTS)/Trace(RV))*var_on_e;
 	      ColumnVector vartemp;
-	      getdiag(vartemp, varmat);
+	      //getdiag(vartemp, varmat);  // obsolete fn
+	      vartemp = diag(varmat);  // MJ NOTE: new fn
 	      var.Rows(batch_pos, numTS) = vartemp;
 	    }      
 	  else
 	    {
 	      varmatfull = (r.Columns(batch_pos, batch_pos+batch_size-1).t()*r.Columns(batch_pos, batch_pos+batch_size-1)/Trace(RV))*var_on_e;
-	      getdiag(vartempfull, varmatfull);
+	      //getdiag(vartempfull, varmatfull);  // obsolete fn
+	      vartempfull = diag(varmatfull);  // MJ NOTE: new fn
 	      var.Rows(batch_pos, batch_pos+batch_size-1) = vartempfull;
 	    }
 	  batch_pos += batch_size;