diff --git a/applications/utilities/postProcessing/stressField/stressComponents/stressComponents.C b/applications/utilities/postProcessing/stressField/stressComponents/stressComponents.C
index aa26a0e0c08e2a2bce2216314e1bc1f910233934..fcf090caa882c5bd66bb026840ef48c6524e9a90 100644
--- a/applications/utilities/postProcessing/stressField/stressComponents/stressComponents.C
+++ b/applications/utilities/postProcessing/stressField/stressComponents/stressComponents.C
@@ -97,7 +97,7 @@ int main(int argc, char *argv[])
                     mesh,
                     IOobject::NO_READ
                 ),
-                sigma.component(tensor::XX)
+                sigma.component(symmTensor::XX)
             );
             sigmaxx.write();
 
@@ -110,7 +110,7 @@ int main(int argc, char *argv[])
                     mesh,
                     IOobject::NO_READ
                 ),
-                sigma.component(tensor::YY)
+                sigma.component(symmTensor::YY)
             );
             sigmayy.write();
 
@@ -123,7 +123,7 @@ int main(int argc, char *argv[])
                     mesh,
                     IOobject::NO_READ
                 ),
-                sigma.component(tensor::ZZ)
+                sigma.component(symmTensor::ZZ)
             );
             sigmazz.write();
 
@@ -136,7 +136,7 @@ int main(int argc, char *argv[])
                     mesh,
                     IOobject::NO_READ
                 ),
-                sigma.component(tensor::XY)
+                sigma.component(symmTensor::XY)
             );
             sigmaxy.write();
 
@@ -149,7 +149,7 @@ int main(int argc, char *argv[])
                     mesh,
                     IOobject::NO_READ
                 ),
-                sigma.component(tensor::XZ)
+                sigma.component(symmTensor::XZ)
             );
             sigmaxz.write();
 
@@ -162,7 +162,7 @@ int main(int argc, char *argv[])
                     mesh,
                     IOobject::NO_READ
                 ),
-                sigma.component(tensor::YZ)
+                sigma.component(symmTensor::YZ)
             );
             sigmayz.write();
 
@@ -190,7 +190,7 @@ int main(int argc, char *argv[])
                     mesh,
                     IOobject::NO_READ
                 ),
-                0.0*sigma.component(tensor::YZ)
+                0.0*sigma.component(symmTensor::YZ)
             );
 
             forAll(sigmaUn.boundaryField(), patchI)
diff --git a/src/OpenFOAM/db/IOstreams/Sstreams/ISstream.C b/src/OpenFOAM/db/IOstreams/Sstreams/ISstream.C
index 8f1ebc754d377bb2169c3f1ff00713c7173eb4e4..d98d75d076dc44f7b27042c5df570242b9cfad4e 100644
--- a/src/OpenFOAM/db/IOstreams/Sstreams/ISstream.C
+++ b/src/OpenFOAM/db/IOstreams/Sstreams/ISstream.C
@@ -45,38 +45,44 @@ char Foam::ISstream::nextValid()
         // Return if stream is bad - ie, previous get() failed
         if (bad() || isspace(c))
         {
-            return 0;
+            break;
         }
 
         // Is this the start of a C/C++ comment?
         if (c == '/')
         {
-            // If cannot get another character, return this one
             if (!get(c))
             {
+                // cannot get another character - return this one
                 return '/';
             }
 
             if (c == '/')
             {
-                // This is the start of a C++ style one-line comment
+                // C++ style single-line comment - skip through past end-of-line
                 while (get(c) && c != '\n')
                 {}
             }
             else if (c == '*')
             {
-                // This is the start of a C style comment
+                // within a C-style comment
                 while (true)
                 {
+                    // search for end of C-style comment - '*/'
                     if (get(c) && c == '*')
                     {
-                        if (get(c) && c == '/')
+                        if (get(c))
                         {
-                            break;
-                        }
-                        else
-                        {
-                            putback(c);
+                            if (c == '/')
+                            {
+                                // matched '*/'
+                                break;
+                            }
+                            else if (c == '*')
+                            {
+                                // check again
+                                putback(c);
+                            }
                         }
                     }
 
@@ -86,17 +92,21 @@ char Foam::ISstream::nextValid()
                     }
                 }
             }
-            else  // A lone '/' so return it.
+            else
             {
+                // The '/' did not start a C/C++ comment - return it
                 putback(c);
                 return '/';
             }
         }
-        else  // c is a valid character so return it
+        else
         {
+            // a valid character - return it
             return c;
         }
     }
+
+    return 0;
 }
 
 
@@ -277,8 +287,8 @@ Foam::Istream& Foam::ISstream::read(token& t)
 //                        }
                     }
 
-                    // nothing converted (bad format), or trailing junk
-                    if (endptr == buf || *endptr != '\0')
+                    // not everything converted: bad format or trailing junk
+                    if (*endptr)
                     {
                         t.setBad();
                     }
@@ -289,7 +299,7 @@ Foam::Istream& Foam::ISstream::read(token& t)
         }
 
 
-        // Should be a word (which can be a single character)
+        // Should be a word (which can also be a single character)
         default:
         {
             putback(c);
diff --git a/src/OpenFOAM/global/argList/argList.C b/src/OpenFOAM/global/argList/argList.C
index 73a753157ea54880b08bcd30c2aef3c00dfe1920..845b852e95ba12effcba34cdfe05410831623e0d 100644
--- a/src/OpenFOAM/global/argList/argList.C
+++ b/src/OpenFOAM/global/argList/argList.C
@@ -117,6 +117,10 @@ bool Foam::argList::regroupArgv(int& argc, char**& argv)
 // get rootPath_ / globalCase_ from one of the following forms
 //   * [-case dir]
 //   * cwd
+//
+// Also export FOAM_CASE and FOAM_CASENAME environment variables
+// so they can be used immediately (eg, in decomposeParDict)
+//
 void Foam::argList::getRootCase()
 {
     fileName casePath;
@@ -151,6 +155,26 @@ void Foam::argList::getRootCase()
     rootPath_   = casePath.path();
     globalCase_ = casePath.name();
     case_       = globalCase_;
+
+
+    // Set the case and case-name as an environment variable
+    if (rootPath_[0] == '/')
+    {
+        // absolute path - use as-is
+        setEnv("FOAM_CASE", rootPath_/globalCase_, true);
+        setEnv("FOAM_CASENAME", globalCase_, true);
+    }
+    else
+    {
+        // qualify relative path
+        fileName casePath = cwd()/rootPath_/globalCase_;
+        casePath.clean();
+
+        setEnv("FOAM_CASE", casePath, true);
+        setEnv("FOAM_CASENAME", casePath.name(), true);
+    }
+
+
 }
 
 
@@ -531,24 +555,6 @@ Foam::argList::argList
     }
     jobInfo.write();
 
-
-    // Set the case and case-name as an environment variable
-    if (rootPath_[0] == '/')
-    {
-        // absolute path - use as-is
-        setEnv("FOAM_CASE", rootPath_/globalCase_, true);
-        setEnv("FOAM_CASENAME", globalCase_, true);
-    }
-    else
-    {
-        // qualify relative path
-        fileName casePath = cwd()/rootPath_/globalCase_;
-        casePath.clean();
-
-        setEnv("FOAM_CASE", casePath, true);
-        setEnv("FOAM_CASENAME", casePath.name(), true);
-    }
-
     // Switch on signal trapping. We have to wait until after Pstream::init
     // since this sets up its own ones.
     sigFpe_.set(bannerEnabled);
diff --git a/src/finiteVolume/cfdTools/general/porousMedia/porousZone.C b/src/finiteVolume/cfdTools/general/porousMedia/porousZone.C
index 34e85c2e272eb3a48c93cace73178ba5fccc17b6..3251e2541eeeb5834d134dd62622477dc9c820fe 100644
--- a/src/finiteVolume/cfdTools/general/porousMedia/porousZone.C
+++ b/src/finiteVolume/cfdTools/general/porousMedia/porousZone.C
@@ -81,7 +81,10 @@ Foam::porousZone::porousZone
 {
     Info<< "Creating porous zone: " << name_ << endl;
 
-    if (cellZoneID_ == -1 && !Pstream::parRun())
+    bool foundZone = (cellZoneID_ != -1);
+    reduce(foundZone, orOp<bool>());
+
+    if (!foundZone && Pstream::master())
     {
         FatalErrorIn
         (
@@ -91,6 +94,7 @@ Foam::porousZone::porousZone
             << exit(FatalError);
     }
 
+
     // porosity
     if (dict_.readIfPresent("porosity", porosity_))
     {