diff --git a/lib/libstereo/src/algorithms/clustersf.cu b/lib/libstereo/src/algorithms/clustersf.cu
index 27bbd38b39906726395d934406b566e595b3180f..0ab9900ef8759c99a0f96da6a9d5c8e0fc75f17a 100644
--- a/lib/libstereo/src/algorithms/clustersf.cu
+++ b/lib/libstereo/src/algorithms/clustersf.cu
@@ -58,7 +58,7 @@ void StereoCSF::compute(cv::InputArray l, cv::InputArray r, cv::OutputArray disp
 
 	cv::Mat gradtmp;
 	impl_->gl.toGpuMat().download(gradtmp);
-	cv::imshow("Gradient Left", gradtmp);
+	//cv::imshow("Gradient Left", gradtmp);
 
 	cv::Mat tmp;
 	impl_->focal.toGpuMat().download(tmp);
diff --git a/lib/libstereo/src/filters/salient_gradient.hpp b/lib/libstereo/src/filters/salient_gradient.hpp
index d1bbbcc9d9a00faa3cd48fb5d7a38853fddf56a6..1c08985d55f5cb95d99c8839c198357fed242f28 100644
--- a/lib/libstereo/src/filters/salient_gradient.hpp
+++ b/lib/libstereo/src/filters/salient_gradient.hpp
@@ -93,7 +93,7 @@ struct SalientGradient {
 				float weight = weighting(dist, float(radius));
 				float thresh = gthresh; //max(gthresh, focal_thresh);
 				//for (int u=-3; u<=3; ++u) {
-				//	thresh = (x+u >= 0 && x+u < width) ? max(thresh, float(magnitude(y,x+u))) : thresh;
+				//	thresh = (x+u >= 0 && x+u < width) ? max(thresh, weight*float(magnitude(y,x+u))) : thresh;
 				//}
 
 				float m = float(magnitude(y,x)) * weight;
@@ -104,7 +104,7 @@ struct SalientGradient {
 					buckets.add(y, make_short2(x, a));
 				}
 
-				angle(y,x) = uchar(weight*255.0f);
+				angle(y,x) = uchar(thresh*weight);
 			}
 		}
 	}