Index: trunk/Ohana/src/opihi/cmd.data/vstats.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/vstats.c	(revision 30610)
+++ trunk/Ohana/src/opihi/cmd.data/vstats.c	(revision 32632)
@@ -169,6 +169,6 @@
 
     // we are going to do another pass: mark the entries to skip
-    pmin = max;
-    pmax = min;
+    pmin = min;
+    pmax = max;
     if (iter < Niter - 1) {
       if (vec[0].type == OPIHI_FLT) {
@@ -208,4 +208,5 @@
 skip:
   FREE(mask);
+  if (mask) mask = NULL;
 
   if (!Quiet) {
