Index: /trunk/ppStack/src/ppStackLoop.c
===================================================================
--- /trunk/ppStack/src/ppStackLoop.c	(revision 19268)
+++ /trunk/ppStack/src/ppStackLoop.c	(revision 19269)
@@ -758,6 +758,10 @@
 
         // Ensure masked regions really look masked
-        if (!pmReadoutMaskApply(outRO, maskBad)) {
-            psWarning("Unable to apply mask");
+        {
+            psString maskBadStr = psMetadataLookupStr(NULL, recipe, "MASK.BAD"); // Name of bits for bad
+            psMaskType maskBad = pmConfigMaskGet(maskBadStr, config); // Bits to mask for bad pixels
+            if (!pmReadoutMaskApply(outRO, maskBad)) {
+                psWarning("Unable to apply mask");
+            }
         }
 
