diff --git a/components/operators/src/mask.cpp b/components/operators/src/mask.cpp
index 15bd8c85a3517795dbd9a5469c9f83340863ebda..31038b7bbae52aa6e66dcf0f14c681ef51a16236 100644
--- a/components/operators/src/mask.cpp
+++ b/components/operators/src/mask.cpp
@@ -85,7 +85,7 @@ CullDiscontinuity::~CullDiscontinuity() {
 bool CullDiscontinuity::apply(ftl::rgbd::Frame &in, ftl::rgbd::Frame &out, cudaStream_t stream) {
 	if (!in.hasChannel(Channel::Depth) || !in.hasChannel(Channel::Mask)) return false;
 
-	uint8_t maskID = config()->value("mask_id", (unsigned int)ftl::cuda::Mask::kMask_Discontinuity);
+	uint8_t maskID = config()->value("mask_id", (unsigned int)(ftl::cuda::Mask::kMask_Discontinuity | ftl::cuda::Mask::kMask_Bad));
 	unsigned int radius = config()->value("radius", 2);
 	bool inverted = config()->value("invert", false);
 	
diff --git a/components/operators/src/mask.cu b/components/operators/src/mask.cu
index 4205be4ae5b2408656a96fa2d77dc485a620d348..85fde5190a7c1e4fd69432b61b515a0c868501de 100644
--- a/components/operators/src/mask.cu
+++ b/components/operators/src/mask.cu
@@ -109,7 +109,7 @@ __global__ void cull_mask_kernel(ftl::cuda::TextureObject<uint8_t> mask, ftl::cu
 	const unsigned int x = blockIdx.x*blockDim.x + threadIdx.x;
 	const unsigned int y = blockIdx.y*blockDim.y + threadIdx.y;
 
-	if (x < depth.width()-RADIUS && y < depth.height()-RADIUS) {
+	if (x < depth.width() && y < depth.height()) {
 		bool isdiscon = false;
 
 		#pragma unroll