diff --git a/src/SHOCK/fix_append_atoms.h b/src/SHOCK/fix_append_atoms.h
index 1368d164b62a3b24cd9838d4738e96c8dc3f7e80..d9885998bea9f68fa3894b36d7c2d7d1643436f6 100644
--- a/src/SHOCK/fix_append_atoms.h
+++ b/src/SHOCK/fix_append_atoms.h
@@ -79,8 +79,7 @@ must be of type m (shrink/minimum).
 
 E: Bad fix ID in fix append/atoms command
 
-The value of the fix_id for keyword spatial must start with the suffix
-f_.
+The value of the fix_id for keyword spatial must start with 'f_'.
 
 E: Invalid basis setting in fix append/atoms command
 
diff --git a/src/USER-MISC/fix_ttm_mod.cpp b/src/USER-MISC/fix_ttm_mod.cpp
index f7b81c72061e9e75a55b761b17754efef8f20cf5..4bf90fdca3205c9dee06020390879b83311e2b02 100644
--- a/src/USER-MISC/fix_ttm_mod.cpp
+++ b/src/USER-MISC/fix_ttm_mod.cpp
@@ -282,7 +282,6 @@ FixTTMMod::FixTTMMod(LAMMPS *lmp, int narg, char **arg) :
   if (me == 0) read_initial_electron_temperatures(fpr);
   MPI_Bcast(&T_electron[0][0][0],total_nnodes,MPI_DOUBLE,0,world);
   fclose(fpr);
-  fclose(fpr_2);
 }
 
 /* ---------------------------------------------------------------------- */
diff --git a/src/fix_shear_history.cpp b/src/fix_shear_history.cpp
index 2577c16be83d8329c829fb3e4ef3c1ae09196bab..8e8c1bb53bfd54742516aa40a1effbf738dd12c4 100644
--- a/src/fix_shear_history.cpp
+++ b/src/fix_shear_history.cpp
@@ -29,13 +29,13 @@
 using namespace LAMMPS_NS;
 using namespace FixConst;
 
-enum{NPARTNER,PERPARTNER};
+enum{DEFAULT,NPARTNER,PERPARTNER};
 
 /* ---------------------------------------------------------------------- */
 
 FixShearHistory::FixShearHistory(LAMMPS *lmp, int narg, char **arg) :
   Fix(lmp, narg, arg),
-  npartner(NULL), partner(NULL), shearpartner(NULL), ipage(NULL), dpage(NULL)
+  npartner(NULL), partner(NULL), shearpartner(NULL), pair(NULL), ipage(NULL), dpage(NULL)
 {
   if (narg != 4) error->all(FLERR,"Illegal fix SHEAR_HISTORY commmand");
 
@@ -71,6 +71,7 @@ FixShearHistory::FixShearHistory(LAMMPS *lmp, int narg, char **arg) :
   maxtouch = 0;
 
   nlocal_neigh = nall_neigh = 0;
+  commflag = DEFAULT;
 }
 
 /* ---------------------------------------------------------------------- */
@@ -87,6 +88,14 @@ FixShearHistory::~FixShearHistory()
   memory->destroy(npartner);
   memory->sfree(partner);
   memory->sfree(shearpartner);
+
+  // to better detect use-after-delete errors
+
+  pair = NULL;
+  npartner = NULL;
+  partner = NULL;
+  shearpartner = NULL;
+
   delete [] ipage;
   delete [] dpage;
 }
@@ -609,7 +618,7 @@ int FixShearHistory::pack_reverse_comm(int n, int first, double *buf)
         m += dnum;
       }
     }
-  }
+  } else error->all(FLERR,"Unsupported comm mode in shear history");
 
   return m;
 }
@@ -640,7 +649,7 @@ void FixShearHistory::unpack_reverse_comm(int n, int *list, double *buf)
         m += dnum;
       }
     }
-  }
+  } else error->all(FLERR,"Unsupported comm mode in shear history");
 }
 
 /* ----------------------------------------------------------------------