diff --git a/stitch_project/stitch/DistanceUnwrapper.vhd b/stitch_project/stitch/DistanceUnwrapper.vhd
index 7f64de8f4dfed7a7ddd6c9ef06f140d6c81a9851..df55a193545a21a47559a5da755a3627cd3ab018 100644
--- a/stitch_project/stitch/DistanceUnwrapper.vhd
+++ b/stitch_project/stitch/DistanceUnwrapper.vhd
@@ -33,7 +33,7 @@ end DistanceUnwrapper;
 
 architecture Behavioral of DistanceUnwrapper is
 
-type STATE_T is (IDLE_S, STATE1, STATE2, STATE3, STATE4, STATE5, STATE6);
+type STATE_T is (IDLE_S, STATE1, STATE2, STATE3);
 
 signal current_state : STATE_T := IDLE_S;
 
@@ -102,7 +102,7 @@ begin
 				--calculate change to offset here 
 				if calcDelta > maxDelta then
 					--we have wrapped around 
-					if newIsLarger then
+					if newIsLarger = '1' then
 						--went negative
 						currentOffset <= currentOffset + corrDeltaN;
 					else 
@@ -116,7 +116,7 @@ begin
 				newIsLarger <= newIsLarger;
 				calcDelta <= calcDelta;
 				currentDistance <= currentDistance;
-				dr_out <= dr_out;
+				dr_out <= '0';
 				prevDistance <= prevDistance;
 					
 			when STATE2 => 
@@ -127,7 +127,7 @@ begin
 				newIsLarger <= newIsLarger;
 				calcDelta <= calcDelta;
 				currentOffset <= currentOffset;
-				dr_out <= dr_out;
+				dr_out <= '0';
 				prevDistance <= latchedDistance;
 
 			when STATE3 =>