diff --git a/doc/src/fix_temp_rescale.txt b/doc/src/fix_temp_rescale.txt
index 582641ca015dcc74b1eba34e3c445364c0a122d0..f38d20d0d784efda909b41a7954b5b15ffa3ced9 100644
--- a/doc/src/fix_temp_rescale.txt
+++ b/doc/src/fix_temp_rescale.txt
@@ -54,7 +54,7 @@ name.  In this case, the variable will be evaluated each timestep, and
 its value used to determine the target temperature.
 
 Equal-style variables can specify formulas with various mathematical
-functions, and include "thermo_style"_thermox_style.html command
+functions, and include "thermo_style"_thermo_style.html command
 keywords for the simulation box parameters and timestep and elapsed
 time.  Thus it is easy to specify a time-dependent temperature.
 
diff --git a/src/GRANULAR/fix_wall_gran_region.cpp b/src/GRANULAR/fix_wall_gran_region.cpp
index b3b21660d811f70245fcccc7c95b9f5c2f6a1ea8..2ba8e05f625c94925f5f9a9474659de2d012e34b 100644
--- a/src/GRANULAR/fix_wall_gran_region.cpp
+++ b/src/GRANULAR/fix_wall_gran_region.cpp
@@ -85,6 +85,8 @@ FixWallGranRegion::FixWallGranRegion(LAMMPS *lmp, int narg, char **arg) :
 FixWallGranRegion::~FixWallGranRegion()
 {
   delete [] c2r;
+  delete [] region_style;
+
   memory->destroy(ncontact);
   memory->destroy(walls);
   memory->destroy(shearmany);
diff --git a/src/USER-DPD/fix_dpd_energy.h b/src/USER-DPD/fix_dpd_energy.h
index d9101185b4c48d15bd2955bacf91dbcb38e8014d..9be41c3b9a4e93fa61b8a195dc43bc6c0ddfffab 100644
--- a/src/USER-DPD/fix_dpd_energy.h
+++ b/src/USER-DPD/fix_dpd_energy.h
@@ -33,10 +33,6 @@ class FixDPDenergy : public Fix {
   virtual void final_integrate();
 
  protected:
-  double dtv,dtf;
-  int mass_require;
-  int eos;
-
   class PairDPDfdtEnergy *pairDPDE;
 };
 
diff --git a/src/fix_halt.cpp b/src/fix_halt.cpp
index 301e678e38b09868bbb4f9047b220d06a8b33d48..da46353b6a8ac549dfd3a0c96ed0e14f4734b1df 100644
--- a/src/fix_halt.cpp
+++ b/src/fix_halt.cpp
@@ -182,7 +182,7 @@ void FixHalt::end_of_step()
 
 void FixHalt::post_run()
 {
-  // continue halt -> subsequent runs are allowd
+  // continue halt -> subsequent runs are allowed
 
   if (eflag == CONTINUE) timer->reset_timeout();
 }
diff --git a/src/region_cone.cpp b/src/region_cone.cpp
index 786b92d3b7c793bb7ab9797302037998b3f79f97..dce0e64b0fd39bc7b057a168a7aa705523b8cbc9 100644
--- a/src/region_cone.cpp
+++ b/src/region_cone.cpp
@@ -174,34 +174,31 @@ int RegCone::inside(double x, double y, double z)
 {
   double del1,del2,dist;
   double currentradius;
-  int inside;
 
   if (axis == 'x') {
     del1 = y - c1;
     del2 = z - c2;
     dist = sqrt(del1*del1 + del2*del2);
     currentradius = radiuslo + (x-lo)*(radiushi-radiuslo)/(hi-lo);
-    if (dist <= currentradius && x >= lo && x <= hi) inside = 1;
-    else inside = 0;
-  }
-  if (axis == 'y') {
+    if (dist <= currentradius && x >= lo && x <= hi) return 1;
+    else return 0;
+  } else if (axis == 'y') {
     del1 = x - c1;
     del2 = z - c2;
     dist = sqrt(del1*del1 + del2*del2);
     currentradius = radiuslo + (y-lo)*(radiushi-radiuslo)/(hi-lo);
-    if (dist <= currentradius && y >= lo && y <= hi) inside = 1;
-    else inside = 0;
-  }
-  if (axis == 'z') {
+    if (dist <= currentradius && y >= lo && y <= hi) return 1;
+    else return 0;
+  } else if (axis == 'z') {
     del1 = x - c1;
     del2 = y - c2;
     dist = sqrt(del1*del1 + del2*del2);
     currentradius = radiuslo + (z-lo)*(radiushi-radiuslo)/(hi-lo);
-    if (dist <= currentradius && z >= lo && z <= hi) inside = 1;
-    else inside = 0;
+    if (dist <= currentradius && z >= lo && z <= hi) return 1;
+    else return 0;
   }
 
-  return inside;
+  return 0;
 }
 
 /* ----------------------------------------------------------------------
@@ -414,7 +411,7 @@ int RegCone::surface_exterior(double *x, double cutoff)
 
     // radius of curvature, only used for granular walls
 
-    double crad = 0.0; 
+    crad = 0.0;
 
     // x is far enough from cone that there is no contact
     // x is interior to cone
@@ -478,6 +475,10 @@ int RegCone::surface_exterior(double *x, double cutoff)
     r = sqrt(del1*del1 + del2*del2);
     currentradius = radiuslo + (x[1]-lo)*(radiushi-radiuslo)/(hi-lo);
 
+    // radius of curvature, only used for granular walls
+
+    crad = 0.0;
+
     // y is far enough from cone that there is no contact
     // y is interior to cone
 
@@ -539,6 +540,10 @@ int RegCone::surface_exterior(double *x, double cutoff)
     r = sqrt(del1*del1 + del2*del2);
     currentradius = radiuslo + (x[2]-lo)*(radiushi-radiuslo)/(hi-lo);
 
+    // radius of curvature, only used for granular walls
+
+    crad = 0.0;
+
     // z is far enough from cone that there is no contact
     // z is interior to cone
 
diff --git a/src/region_cylinder.cpp b/src/region_cylinder.cpp
index b2935f22cb8805d380c04109bc0277398f5efa27..6ad70dc8ed93863f4791d69fef582010a72b2fc9 100644
--- a/src/region_cylinder.cpp
+++ b/src/region_cylinder.cpp
@@ -67,7 +67,7 @@ RegCylinder::RegCylinder(LAMMPS *lmp, int narg, char **arg) :
     shape_update();
   } else {
     radius = force->numeric(FLERR,arg[5]);
-    if (axis == 'x') radius *= xscale;
+    if (axis == 'x') radius *= yscale;
     else radius *= xscale;
     rstyle = CONSTANT;
   }
@@ -618,7 +618,7 @@ int RegCylinder::surface_exterior(double *x, double cutoff)
           dx = 0;
           zp = x[2];
         }
-        d2 = d2prev = dr2 + dx*dx;
+        d2prev = dr2 + dx*dx;
       }
 
       // closest point on bottom cap
diff --git a/src/timer.cpp b/src/timer.cpp
index 583c6a2b3f3e5489e6edab8411af381b8ba1030e..9c1aa8794398c03345fe3882f40399725e6bfcf5 100644
--- a/src/timer.cpp
+++ b/src/timer.cpp
@@ -95,10 +95,10 @@ Timer::Timer(LAMMPS *lmp) : Pointers(lmp)
 {
   _level = NORMAL;
   _sync  = OFF;
-  _timeout = -1.0;
+  _timeout = -1;
+  _s_timeout = -1;
   _checkfreq = 10;
   _nextcheck = -1;
-  _laststep = -1;
   this->_stamp(RESET);
 }
 
@@ -216,7 +216,7 @@ void Timer::set_wall(enum ttype which, double newtime)
 
 void Timer::init_timeout()
 {
-  _laststep = -1;
+  _s_timeout = _timeout;
   if (_timeout < 0)
     _nextcheck = -1;
   else
@@ -249,14 +249,6 @@ void Timer::print_timeout(FILE *fp)
 
 /* ---------------------------------------------------------------------- */
 
-void Timer::force_timeout()
-{
-  _timeout = 0.0;
-  _nextcheck = _laststep + 1;
-}
-
-/* ---------------------------------------------------------------------- */
-
 bool Timer::_check_timeout()
 {
   double walltime = MPI_Wtime() - timeout_start;
diff --git a/src/timer.h b/src/timer.h
index ff9c66db7c7366ffcacefe5edf5a0cf1a29349ac..6159180faffdd2b768850eca24ee265a236088b0 100644
--- a/src/timer.h
+++ b/src/timer.h
@@ -64,7 +64,10 @@ class Timer : protected Pointers {
   void init_timeout();
 
   // trigger enforced timeout
-  void force_timeout();
+  void force_timeout() { _timeout = 0.0; }
+
+  // restore original timeout setting after enforce timeout
+  void reset_timeout() { _timeout = _s_timeout; }
 
   // get remaining time in seconds. 0.0 if inactive, negative if expired
   double get_timeout_remain();
@@ -75,7 +78,7 @@ class Timer : protected Pointers {
   // check for timeout. inline wrapper around internal
   // function to reduce overhead in case there is no check.
   bool check_timeout(int step) {
-    _laststep = step;
+    if (_timeout == 0.0) return true;
     if (_nextcheck != step) return false;
     else return _check_timeout();
   }
@@ -91,9 +94,9 @@ class Timer : protected Pointers {
   int _level;     // level of detail: off=0,loop=1,normal=2,full=3
   int _sync;      // if nonzero, synchronize tasks before setting the timer
   int _timeout;   // max allowed wall time in seconds. infinity if negative
+  int _s_timeout; // copy of timeout for restoring after a forced timeout
   int _checkfreq; // frequency of timeout checking
   int _nextcheck; // loop number of next timeout check
-  int _laststep;  // loop number of last iteration
 
   // update one specific timer array
   void _stamp(enum ttype);