diff --git a/lib/haxe/src/org/apache/thrift/helper/Int64Map.hx b/lib/haxe/src/org/apache/thrift/helper/Int64Map.hx
index e648b75..8845fd0 100644
--- a/lib/haxe/src/org/apache/thrift/helper/Int64Map.hx
+++ b/lib/haxe/src/org/apache/thrift/helper/Int64Map.hx
@@ -52,9 +52,9 @@
 
     private function GetLowMap( key : haxe.Int64, canCreate : Bool) : IntMap< T> {
         #if( haxe_ver < 3.2)
-        return GetSubMap( Int64.getHigh(key), false);
+        return GetSubMap( Int64.getHigh(key), canCreate);
         #else
-        return GetSubMap( key.high, false);
+        return GetSubMap( key.high, canCreate);
         #end
     }
 
@@ -70,10 +70,10 @@
 
     private function NullCheck( key : haxe.Int64) : Bool {
         #if( haxe_ver < 3.2)
-		return (key != null);  
+        return (key != null);
         #else
-		return false;  // In64 is not nullable anymore (it never really was)
-		#end
+        return true;  // Int64 is not nullable anymore (it never really was)
+        #end
     };
 
 
@@ -183,9 +183,10 @@
             if( first) {
                 first = false;
             } else {
-                result += ", ";
+                result += ",";
             }
 
+            result += " ";
             var value = this.get(key);
             result += Int64.toStr(key) + ' => $value';
         }
diff --git a/lib/haxe/src/org/apache/thrift/protocol/TCompactProtocol.hx b/lib/haxe/src/org/apache/thrift/protocol/TCompactProtocol.hx
index e945789..c4d0ced 100644
--- a/lib/haxe/src/org/apache/thrift/protocol/TCompactProtocol.hx
+++ b/lib/haxe/src/org/apache/thrift/protocol/TCompactProtocol.hx
@@ -700,7 +700,6 @@
         try
         {
             return tcompactTypeToType[type];
-            throw "fuck";
         }
         catch ( e : Dynamic)
         {
diff --git a/lib/haxe/test/Makefile.am b/lib/haxe/test/Makefile.am
index 91cfc90..7d29f81 100644
--- a/lib/haxe/test/Makefile.am
+++ b/lib/haxe/test/Makefile.am
@@ -36,9 +36,12 @@
 
 all-local: $(BIN_CPP)
 
-$(BIN_CPP): gen-haxe/thrift/test/ThriftTest.hx \
-			gen-haxe/thrift/test/Aggr.hx \
-			gen-haxe/thrift/test/BenchmarkService.hx
+$(BIN_CPP): \
+		src/*.hx \
+		../src/org/apache/thrift/**/*.hx \
+		gen-haxe/thrift/test/ThriftTest.hx \
+		gen-haxe/thrift/test/Aggr.hx \
+		gen-haxe/thrift/test/BenchmarkService.hx
 	$(HAXE) --cwd .  cpp.hxml
 
 
@@ -49,7 +52,7 @@
 #    $(HAXE)  --cwd .  javascript
 #    $(HAXE)  --cwd .  neko
 #    $(HAXE)  --cwd .  php
-#    $(HAXE)  --cwd .  python  # needs Haxe 3.1.4
+#    $(HAXE)  --cwd .  python  # needs Haxe 3.2.0
 
 
 clean-local:
diff --git a/test/haxe/Makefile.am b/test/haxe/Makefile.am
index 1e537d3..37ccfc3 100644
--- a/test/haxe/Makefile.am
+++ b/test/haxe/Makefile.am
@@ -28,7 +28,10 @@
 
 all-local: $(BIN_CPP)
 
-$(BIN_CPP):    gen-haxe/thrift/test/ThriftTest.hx
+$(BIN_CPP): \
+		src/*.hx \
+		../../lib/haxe/src/org/apache/thrift/**/*.hx \
+		gen-haxe/thrift/test/ThriftTest.hx
 	$(HAXE) --cwd .  cpp.hxml
 
 
@@ -39,7 +42,7 @@
 #    $(HAXE)  --cwd .  javascript
 #    $(HAXE)  --cwd .  neko
 #    $(HAXE)  --cwd .  php
-#    $(HAXE)  --cwd .  python  # needs Haxe 3.1.4
+#    $(HAXE)  --cwd .  python  # needs Haxe 3.2.0
 
 
 clean-local:
diff --git a/test/haxe/src/TestClient.hx b/test/haxe/src/TestClient.hx
index 5193c47..8e43c76 100644
--- a/test/haxe/src/TestClient.hx
+++ b/test/haxe/src/TestClient.hx
@@ -92,8 +92,8 @@
 
     public function PrintSummary() : Void {
         var total = successCnt + errorCnt;
-        var sp = (100 * successCnt) / total;
-        var ep = (100 * errorCnt) / total;
+        var sp = Math.round((1000 * successCnt) / total) / 10;
+        var ep = Math.round((1000 * errorCnt) / total) / 10;
 
         trace('===========================');
         trace('Tests executed    $total');
@@ -134,17 +134,17 @@
                 exitCode = rslt.CalculateExitCode();
             }
 
-            difft = Timer.stamp() - difft;
+            difft = Math.round( 1000 * (Timer.stamp() - difft)) / 1000;
             trace('total test time: $difft seconds');
         }
         catch (e : TException)
         {
-            trace('$e');
+            trace('TException: $e');
             exitCode = 0xFF;
         }
         catch (e : Dynamic)
         {
-            trace('$e');
+            trace('Exception: $e');
             exitCode = 0xFF;
         }
 
@@ -219,10 +219,12 @@
             protocol = new TCompactProtocol(transport);
         }
 
-
-        // run the test code
+        // some quick and basic unit tests
         HaxeBasicsTest( args, rslt);
         ModuleUnitTests( args, rslt);
+
+        // now run the test code
+        trace('- ${args.numIterations} iterations');
         for( i in 0 ... args.numIterations) {
             ClientTest( transport, protocol, args, rslt);
         }
@@ -250,6 +252,9 @@
         map32.set( 0, -123);
         map64.set( Int64.make(0,0), -123);
 
+        //trace('map32 = $map32');
+        //trace('map64 = $map64');
+
         rslt.Expect( map32.keys().hasNext() == map64.keys().hasNext(), "Int64Map<Int32> Test #10");
         rslt.Expect( map32.exists( 4711) == map64.exists( Int64.make(47,11)), "Int64Map<Int32> Test #11");
         rslt.Expect( map32.exists( -517) == map64.exists( Int64.neg(Int64.make(0,517))), "Int64Map<Int32> Test #12");
@@ -385,12 +390,12 @@
         }
         catch (e : TException)
         {
-            trace('$e');
+            rslt.Expect( false, 'unable to open transport: $e');
             return;
         }
         catch (e : Dynamic)
         {
-            trace('$e');
+            rslt.Expect( false, 'unable to open transport: $e');
             return;
         }
 
@@ -726,10 +731,14 @@
         var pos = mm.get(4);
         var neg = mm.get(-4);
         rslt.Expect( (pos != null) && (neg != null), "(pos != null) && (neg != null)");
-        for (i in 0 ... 5) {
+        for (i in 1 ... 5) {
             rslt.Expect( pos.get(i) == i, 'pos.get($i) == $i');
             rslt.Expect( neg.get(-i) == -i, 'neg.get(-$i) == -$i');
-         }
+        }
+        rslt.Expect( ! pos.exists(0), '!pos.exists(0)');
+        rslt.Expect( ! neg.exists(-0), '!neg.exists(-0)');
+        rslt.Expect( ! pos.exists(42), '!pos.exists(42)');
+        rslt.Expect( ! neg.exists(-42), '!neg.exists(-42)');
 
 
         rslt.StartTestGroup( TestResults.EXITCODE_FAILBIT_STRUCTS);
@@ -877,7 +886,7 @@
             for ( k in 0 ... 1000) {
                 client.testVoid();
             }
-            difft = Timer.stamp() - difft;
+            difft = Math.round( 1000 * (Timer.stamp() - difft)) / 1000;
             trace('$difft ms per testVoid() call');
         }
     }
diff --git a/tutorial/haxe/Makefile.am b/tutorial/haxe/Makefile.am
index a781b5a..c3c5204 100644
--- a/tutorial/haxe/Makefile.am
+++ b/tutorial/haxe/Makefile.am
@@ -26,7 +26,10 @@
 
 check: gen-haxe/tutorial/calculator.hx
 
-bin/Main-debug:    gen-haxe/tutorial/calculator.hx
+bin/Main-debug: \
+		src/*.hx \
+		../../lib/haxe/src/org/apache/thrift/**/*.hx \
+		gen-haxe/tutorial/calculator.hx
 	$(HAXE) --cwd .  cpp.hxml
 
 tutorialserver: all
