diff --git a/components/rgbd-sources/src/algorithms/fixstars_sgm.cpp b/components/rgbd-sources/src/algorithms/fixstars_sgm.cpp
index 4274af03342491dd51100d8ebc0e8e27f0ce6986..80f7abd92a56a3c260f342fb789cd7cdaebba492 100644
--- a/components/rgbd-sources/src/algorithms/fixstars_sgm.cpp
+++ b/components/rgbd-sources/src/algorithms/fixstars_sgm.cpp
@@ -33,9 +33,10 @@ void FixstarsSGM::compute(const cv::Mat &l, const cv::Mat &r, cv::Mat &disp) {
 	//std::chrono::duration<double> elapsed =
 	//		std::chrono::high_resolution_clock::now() - start;
 	//LOG(INFO) << "CUDA sgm in " << elapsed.count() << "s";
-
+	
+	// todo: fix libSGM (return float data or provide mask separately)
+	// (256 << 5) coded in libSGM consistency check
+	Mat bad_pixels = (disp == (256 << 5)); 
 	disp.convertTo(disp, CV_32F, 1.0f/16.0f);
-}
-
-
-
+	disp.setTo(0, bad_pixels); // decide how bad values should be represented
+}
\ No newline at end of file