Index: trunk/psModules/src/imcombine/pmSubtraction.c
===================================================================
--- trunk/psModules/src/imcombine/pmSubtraction.c	(revision 21363)
+++ trunk/psModules/src/imcombine/pmSubtraction.c	(revision 21428)
@@ -61,5 +61,5 @@
     // Normalise so that the sum of the variance kernel is the square of the sum of the normal kernel
     // This is required to keep the relative scaling between the image and the variance map
-    psBinaryOp(out->image, out->image, "*", psScalarAlloc(PS_SQR(sumNormal) / sumVariance, PS_TYPE_F32));
+    psBinaryOp(out->image, out->image, "*", psScalarAlloc(1.0 / sumVariance, PS_TYPE_F32));
 
     return out;
@@ -1087,6 +1087,6 @@
     const psRegion *region = args->data[15]; // Region to convolve
     const pmSubtractionKernels *kernels = args->data[16]; // Kernels
-    bool doBG = PS_SCALAR_VALUE(args->data[17], PS_TYPE_IMAGE_MASK_DATA); // Do background subtraction?
-    bool useFFT = PS_SCALAR_VALUE(args->data[18], PS_TYPE_IMAGE_MASK_DATA); // Use FFT for convolution?
+    bool doBG = PS_SCALAR_VALUE(args->data[17], PS_TYPE_U8); // Do background subtraction?
+    bool useFFT = PS_SCALAR_VALUE(args->data[18], PS_TYPE_U8); // Use FFT for convolution?
 
     return subtractionConvolvePatch(numCols, numRows, x0, y0, out1, out2, convMask, ro1, ro2, sys1, sys2,
