diff --git a/Source/Processors/SpikeSorter/SpikeSortBoxes.cpp b/Source/Processors/SpikeSorter/SpikeSortBoxes.cpp
index 905ff28797d920671e379d90abc36e6a7c8b78f3..6689fedadf6b6d167aca8c9c8231c310c05d96df 100644
--- a/Source/Processors/SpikeSorter/SpikeSortBoxes.cpp
+++ b/Source/Processors/SpikeSorter/SpikeSortBoxes.cpp
@@ -145,10 +145,10 @@ bool Box::LineSegmentIntersection(PointD p11, PointD p12, PointD p21, PointD p22
 bool Box::isWaveFormInside(SpikeObject *so)
 {
 	PointD BoxTopLeft(x, y);
-	PointD BoxBottomLeft(x, (y + h));
+	PointD BoxBottomLeft(x, (y - h));
 
 	PointD BoxTopRight(x + w, y);
-	PointD BoxBottomRight(x + w, (y + h));
+	PointD BoxBottomRight(x + w, (y - h));
 
 	// y,and h are given in micro volts.
 	// x and w and given in micro seconds.