Index: /trunk/Ohana/src/imregister/detrend/imdef.c
===================================================================
--- /trunk/Ohana/src/imregister/detrend/imdef.c	(revision 9)
+++ /trunk/Ohana/src/imregister/detrend/imdef.c	(revision 10)
@@ -91,8 +91,8 @@
 
   /* select the filter */
-  if (descriptor[0].type != T_DARK) goto skip_filter;
-  if (descriptor[0].type != T_BIAS) goto skip_filter;
-  if (descriptor[0].type != T_MASK) goto skip_filter;
-  if (descriptor[0].filter == FILTER_NONE) goto skip_filter;
+  if (descriptor[0].type == T_DARK) goto skip_filter;
+  if (descriptor[0].type == T_BIAS) goto skip_filter;
+  if (descriptor[0].type == T_MASK) goto skip_filter;
+  if (descriptor[0].filter != FILTER_NONE) goto skip_filter;
   if (!fits_scan (&header, FilterKeyword, "%s", 1, line)) {
     fprintf (stderr, "ERROR: failure to read %s from header\n", FilterKeyword);
