diff --git a/src/VORONOI/compute_voronoi_atom.cpp b/src/VORONOI/compute_voronoi_atom.cpp
index 305a98716de7093b572cb1ef77e0de9abaf2c15b..2a4d65de1f9d85e8e63959fcdf27c9412a78fd74 100644
--- a/src/VORONOI/compute_voronoi_atom.cpp
+++ b/src/VORONOI/compute_voronoi_atom.cpp
@@ -113,6 +113,12 @@ ComputeVoronoi::ComputeVoronoi(LAMMPS *lmp, int narg, char **arg) :
       else if (strcmp(arg[iarg+1],"no") == 0) faces_flag = 0;
       else error->all(FLERR,"Illegal compute voronoi/atom command");
       iarg += 2;
+    } else if (strcmp(arg[iarg], "peratom") == 0) {
+      if (iarg + 2 > narg) error->all(FLERR,"Illegal compute voronoi/atom command");
+      if (strcmp(arg[iarg+1],"yes") == 0) peratom_flag = 1;
+      else if (strcmp(arg[iarg+1],"no") == 0) peratom_flag = 0;
+      else error->all(FLERR,"Illegal compute voronoi/atom command");
+      iarg += 2;
     }
     else error->all(FLERR,"Illegal compute voronoi/atom command");
   }
@@ -137,6 +143,7 @@ ComputeVoronoi::ComputeVoronoi(LAMMPS *lmp, int narg, char **arg) :
   if (faces_flag) {
     local_flag = 1;
     size_local_cols = 3;
+    size_local_rows = 0;
     nfacesmax = 0;
   }
 }
@@ -298,7 +305,7 @@ void ComputeVoronoi::buildCells()
   }
 
   // clear edge statistics
-  for (i = 0; i < maxedge; ++i) edge[i]=0;
+  for (i = 0; i <= maxedge; ++i) edge[i]=0;
 
   // initialize voro++ container
   // preallocates 8 atoms per cell
@@ -606,6 +613,14 @@ void ComputeVoronoi::compute_vector()
 
 /* ---------------------------------------------------------------------- */
 
+void ComputeVoronoi::compute_local()
+{
+  invoked_local = update->ntimestep;
+  if( invoked_peratom < invoked_local ) compute_peratom();
+}
+
+/* ---------------------------------------------------------------------- */
+
 int ComputeVoronoi::pack_forward_comm(int n, int *list, double *buf,
                                   int pbc_flag, int *pbc)
 {
diff --git a/src/VORONOI/compute_voronoi_atom.h b/src/VORONOI/compute_voronoi_atom.h
index 086b0e2936de3f0e108df2604aaaa2e310e51f6c..7d23a611bdcf83bc2e82cc4247742a497400533e 100644
--- a/src/VORONOI/compute_voronoi_atom.h
+++ b/src/VORONOI/compute_voronoi_atom.h
@@ -32,6 +32,7 @@ class ComputeVoronoi : public Compute {
   void init();
   void compute_peratom();
   void compute_vector();
+  void compute_local();
   double memory_usage();
 
   int pack_forward_comm(int, int *, double *, int, int *);