diff --git a/include/Lcomplex.h b/include/Lcomplex.h
index aa513a6..a36088e 100644
--- a/include/Lcomplex.h
+++ b/include/Lcomplex.h
@@ -45,8 +45,6 @@
 
 #pragma GCC system_header
 
-#include <bits/c++config.h>
-
 //no longer include:
 //#include <bits/cpp_type_traits.h>  only thing used was is_floating... 
 //gcc 4.0 cpp_type_traits.h is not compatible with gcc 3.3. 
@@ -135,7 +133,7 @@ namespace std
       template<typename _Up>
         complex<_Tp>& operator/=(const complex<_Up>&);
 
-      friend reset(complex<_Tp>& C) {
+      friend void reset(complex<_Tp>& C) {
 	      reset(C._M_real);
 	      reset(C._M_imag);
       }
diff --git a/include/Ldokchitser.h b/include/Ldokchitser.h
index c67f01a..7b3e5c9 100644
--- a/include/Ldokchitser.h
+++ b/include/Ldokchitser.h
@@ -69,7 +69,7 @@ phi_series(int precision)
     
     // compute the values m[j] for the respective lambda_k[j]
     
-    Complex m[N+1];
+    std::vector<Complex> m(N+1);
     for (j=1;j<=N;j++)
     	m[j] = -2*lambda_k[j] + 2;
 	
@@ -78,7 +78,8 @@ phi_series(int precision)
 	
 	int n,fact_n;
 	Complex log_Gamma[N+1][a+1][MYDIGITS+1];
-	Complex sum_log_Gamma[N+1][MYDIGITS+1];
+        std::vector<std::vector<Complex> > sum_log_Gamma(N+1);
+        for (j=1;j<=N;j++) sum_log_Gamma[j].resize(MYDIGITS+1);
 	
 	for (j=1;j<=N;j++)
 	for (n=0;n<=MYDIGITS;n++)
@@ -103,8 +104,13 @@ phi_series(int precision)
 	
 	// compute the exponential taylor series for gamma = exp(sum_log_Gamma)
 	
-	Complex exp_sum_log_Gamma[N+1][MYDIGITS+1][MYDIGITS+1]; // symmetric functions
-	Complex gamma[N+1][MYDIGITS+1]; // gamma(s+m[j]) for j = 1 to N
+        std::vector<std::vector<std::vector<Complex> > > exp_sum_log_Gamma(N+1); // symmetric functions
+        std::vector<std::vector<Complex> > gamma(N+1); // gamma(s+m[j]) for j = 1 to N
+        for (j=1;j<=N;j++){
+            exp_sum_log_Gamma[j].resize(MYDIGITS+1);
+            gamma[j].resize(MYDIGITS+1);
+        }
+        for (j=1;j<=N;j++) for (n=0;n<=MYDIGITS;n++) exp_sum_log_Gamma[j][n].resize(MYDIGITS+1);
 	Complex temp_gamma[MYDIGITS+1];
 	Complex temp_mult_gamma[MYDIGITS+1];
 	Complex temp_exp_sum_log_Gamma[MYDIGITS+1];
diff --git a/include/Lexplicit_formula.h b/include/Lexplicit_formula.h
index 4b4a4e1..0ede5f6 100644
--- a/include/Lexplicit_formula.h
+++ b/include/Lexplicit_formula.h
@@ -25,7 +25,7 @@ int L_function <ttype>::
 dirichlet_coeffs_log_diff(int num_coeffs, Complex *c)
 {
 
-  Complex b[num_coeffs+1];
+  std::vector<Complex> b(num_coeffs+1);
   int j, n, d1, ind;
   Complex total, total2, temp;
 
