Index: branches/eam_branches/ipp-20101205/Ohana/src/opihi/dvo/avextract.c
===================================================================
--- branches/eam_branches/ipp-20101205/Ohana/src/opihi/dvo/avextract.c	(revision 30579)
+++ branches/eam_branches/ipp-20101205/Ohana/src/opihi/dvo/avextract.c	(revision 30580)
@@ -44,5 +44,8 @@
 
   // parse skyregion options
-  if ((selection = SetRegionSelection (&argc, argv)) == NULL) goto escape;
+  if ((selection = SetRegionSelection (&argc, argv)) == NULL) {
+    print_error(); 
+    goto escape; 
+  }
 
   // command-line is of the form: avextract field,field, field [where (field op value)...]
@@ -68,4 +71,8 @@
   // construct the db Boolean math stack (frees cstack)
   stack = dbRPN (Ncstack, cstack, &Nstack);
+  if (Ncstack && !Nstack) {
+    print_error(); 
+    goto escape; 
+  }
 
   // add the skyregion limits to the where statement (or create)
Index: branches/eam_branches/ipp-20101205/Ohana/src/opihi/dvo/imextract.c
===================================================================
--- branches/eam_branches/ipp-20101205/Ohana/src/opihi/dvo/imextract.c	(revision 30579)
+++ branches/eam_branches/ipp-20101205/Ohana/src/opihi/dvo/imextract.c	(revision 30580)
@@ -62,4 +62,8 @@
   // construct the db Boolean math stack (frees cstack)
   stack = dbRPN (Ncstack, cstack, &Nstack);
+  if (Ncstack && !Nstack) {
+    print_error(); 
+    goto escape; 
+  }
 
   // add the skyregion limits to the where statement (or create)
Index: branches/eam_branches/ipp-20101205/Ohana/src/opihi/dvo/mextract.c
===================================================================
--- branches/eam_branches/ipp-20101205/Ohana/src/opihi/dvo/mextract.c	(revision 30579)
+++ branches/eam_branches/ipp-20101205/Ohana/src/opihi/dvo/mextract.c	(revision 30580)
@@ -68,5 +68,5 @@
   // construct the db Boolean math stack (frees cstack)
   stack = dbRPN (Ncstack, cstack, &Nstack);
-  if ((Ncstack > 0) && (Nstack < 1)) {
+  if (Ncstack && !Nstack) {
     print_error ();
     goto escape;
Index: branches/eam_branches/ipp-20101205/Ohana/src/opihi/dvo/mmextract.c
===================================================================
--- branches/eam_branches/ipp-20101205/Ohana/src/opihi/dvo/mmextract.c	(revision 30579)
+++ branches/eam_branches/ipp-20101205/Ohana/src/opihi/dvo/mmextract.c	(revision 30580)
@@ -106,5 +106,5 @@
   // construct the db Boolean math stack (frees cstack)
   stack1 = dbRPN (Ncstack1, cstack1, &Nstack1);
-  if ((Ncstack1 > 0) && (Nstack1 < 1)) {
+  if (Ncstack1 && !Nstack1) {
     print_error ();
     goto escape;
@@ -113,5 +113,5 @@
   // construct the db Boolean math stack (frees cstack)
   stack2 = dbRPN (Ncstack2, cstack2, &Nstack2);
-  if ((Ncstack2 > 0) && (Nstack2 < 1)) {
+  if (Ncstack2 && !Nstack2) {
     print_error ();
     goto escape;
