diff --git a/src/atom.cpp b/src/atom.cpp
index c7067abc1614099ce45035ac73724426067ab282..0eee4269e02d59c2bb9d309b4731d8393fff4ec1 100644
--- a/src/atom.cpp
+++ b/src/atom.cpp
@@ -237,7 +237,6 @@ Atom::~Atom()
 
   // delete mapping data structures
 
-  memory->destroy(sametag);
   map_delete();
 }
 
diff --git a/src/atom.h b/src/atom.h
index 33ab918af23a9038f217f3a8479451ec1406025e..bc49b11382c6a91f91c9513bf18f77d685028ac7 100644
--- a/src/atom.h
+++ b/src/atom.h
@@ -116,6 +116,7 @@ class Atom : protected Pointers {
 
   int map_style;                  // default or user-specified style of map
                                   // 0 = none, 1 = array, 2 = hash
+  int map_tag_max;                // max atom ID that map() is setup for
 
   // spatial sorting of atoms
 
@@ -198,8 +199,7 @@ class Atom : protected Pointers {
 
   // global to local ID mapping
 
-  int map_tag_max;      // size of map_array
-  int *map_array;       // direct map of length max atom ID + 1
+  int *map_array;       // direct map of length map_tag_max + 1
   int smax;             // max size of sametag
 
   struct HashElem {
diff --git a/src/atom_map.cpp b/src/atom_map.cpp
index 33caa87062eb3d4802557ee170c106fda1a79ce9..93c377b81ea8dbfe7997681543a5a23a5b5ea5d2 100644
--- a/src/atom_map.cpp
+++ b/src/atom_map.cpp
@@ -244,12 +244,18 @@ void Atom::map_one(int global, int local)
 
 void Atom::map_delete()
 {
+  memory->destroy(sametag);
+  sametag = NULL;
+
   if (map_style == 1) {
-    if (map_tag_max) memory->destroy(map_array);
+    memory->destroy(map_array);
+    map_array = NULL;
   } else {
     if (map_nhash) {
       delete [] map_bucket;
       delete [] map_hash;
+      map_bucket = NULL;
+      map_hash = NULL;
     }
     map_nhash = 0;
   }
diff --git a/src/read_dump.cpp b/src/read_dump.cpp
index f1691ab44334ed21d04d72ac5845fac1f7adb7e4..268165c17ef8f5f2929c1a1b2c96c346e23e3526 100644
--- a/src/read_dump.cpp
+++ b/src/read_dump.cpp
@@ -86,6 +86,9 @@ ReadDump::~ReadDump()
 
 void ReadDump::command(int narg, char **arg)
 {
+  if (domain->box_exist == 0)
+    error->all(FLERR,"Read_dump command before simulation box is defined");
+
   if (narg < 2) error->all(FLERR,"Illegal read_dump command");
 
   store_files(1,&arg[0]);
@@ -321,14 +324,24 @@ void ReadDump::header(int fieldinfo)
   yhi = box[1][1];
   zlo = box[2][0];
   zhi = box[2][1];
-  xprd = xhi - xlo;
-  yprd = yhi - ylo;
-  zprd = zhi - zlo;
   if (triclinic_snap) {
     xy = box[0][2];
     xz = box[1][2];
     yz = box[2][2];
+    double xdelta = MIN(0.0,xy);
+    xdelta = MIN(xdelta,xz);
+    xdelta = MIN(xdelta,xy+xz);
+    xlo = xlo - xdelta;
+    xdelta = MAX(0.0,xy);
+    xdelta = MAX(xdelta,xz);
+    xdelta = MAX(xdelta,xy+xz);
+    xhi = xhi - xdelta;
+    ylo = ylo - MIN(0.0,yz);
+    yhi = yhi - MAX(0.0,yz);
   }
+  xprd = xhi - xlo;
+  yprd = yhi - ylo;
+  zprd = zhi - zlo;
 
   // done if not checking fields
 
@@ -662,21 +675,23 @@ int ReadDump::fields_and_keywords(int narg, char **arg)
 
 void ReadDump::process_atoms(int n)
 {
-  int i,m,ifield,itype;
+  int i,m,ifield,itype,itag;;
   int xbox,ybox,zbox;
 
   double **x = atom->x;
   double **v = atom->v;
   tagint *image = atom->image;
   int nlocal = atom->nlocal;
+  int map_tag_max = atom->map_tag_max;
 
   for (i = 0; i < n; i++) {
     ucflag[i] = 0;
 
-    // map() call is invalid if purged all atoms
+    // check if new atom matches one I own
     // setting m = -1 forces new atom not to match
 
-    if (!purgeflag) m = atom->map(static_cast<int> (fields[i][0]));
+    itag = static_cast<int> (fields[i][0]);
+    if (itag <= map_tag_max) m = atom->map(static_cast<int> (fields[i][0]));
     else m = -1;
     if (m < 0 || m >= nlocal) continue;
 
diff --git a/src/rerun.cpp b/src/rerun.cpp
index 38078e7626b6f60e5bdbc7dcdd92306e0c60da9f..4edcd706762f39443756bc504c4ee93c0e490b36 100644
--- a/src/rerun.cpp
+++ b/src/rerun.cpp
@@ -35,11 +35,11 @@ Rerun::Rerun(LAMMPS *lmp) : Pointers(lmp) {}
 
 void Rerun::command(int narg, char **arg)
 {
-  if (narg < 2) error->all(FLERR,"Illegal rerun command");
-
   if (domain->box_exist == 0)
     error->all(FLERR,"Rerun command before simulation box is defined");
 
+  if (narg < 2) error->all(FLERR,"Illegal rerun command");
+
   // list of dump files = args until a keyword
 
   int iarg = 0;