diff --git a/Tools/Replay/LogReader.cpp b/Tools/Replay/LogReader.cpp
index 2f8b62abf7355c976ca4d8cf654a45a5cd6dec90..77bce4c56530bde726186f4c055e9f0f0b878441 100644
--- a/Tools/Replay/LogReader.cpp
+++ b/Tools/Replay/LogReader.cpp
@@ -143,7 +143,7 @@ void LogReader::process_plane(uint8_t type, uint8_t *data, uint16_t length)
         }
         memcpy(&msg, data, sizeof(msg));
         wait_timestamp(msg.time_ms);
-        compass.setHIL(Vector3i(msg.mag_x - msg.offset_x, msg.mag_y - msg.offset_y, msg.mag_z - msg.offset_z));
+        compass.setHIL(Vector3f(msg.mag_x - msg.offset_x, msg.mag_y - msg.offset_y, msg.mag_z - msg.offset_z));
         compass.set_offsets(msg.offset_x, msg.offset_y, msg.offset_z);
         break;
     }
@@ -185,7 +185,7 @@ void LogReader::process_rover(uint8_t type, uint8_t *data, uint16_t length)
         }
         memcpy(&msg, data, sizeof(msg));
         wait_timestamp(msg.time_ms);
-        compass.setHIL(Vector3i(msg.mag_x - msg.offset_x, msg.mag_y - msg.offset_y, msg.mag_z - msg.offset_z));
+        compass.setHIL(Vector3f(msg.mag_x - msg.offset_x, msg.mag_y - msg.offset_y, msg.mag_z - msg.offset_z));
         compass.set_offsets(msg.offset_x, msg.offset_y, msg.offset_z);
         break;
     }
@@ -215,7 +215,7 @@ void LogReader::process_copter(uint8_t type, uint8_t *data, uint16_t length)
         }
         memcpy(&msg, data, sizeof(msg));
         wait_timestamp(msg.time_ms);
-        compass.setHIL(Vector3i(msg.mag_x - msg.offset_x, msg.mag_y - msg.offset_y, msg.mag_z - msg.offset_z));
+        compass.setHIL(Vector3f(msg.mag_x - msg.offset_x, msg.mag_y - msg.offset_y, msg.mag_z - msg.offset_z));
         compass.set_offsets(msg.offset_x, msg.offset_y, msg.offset_z);
         break;
     }
diff --git a/Tools/Replay/Replay.pde b/Tools/Replay/Replay.pde
index 62b7e16ffe2ee3837b82177079775b5a39d569cf..d95dd20e7c482e5ea877ea33848fde61dabc0a4d 100644
--- a/Tools/Replay/Replay.pde
+++ b/Tools/Replay/Replay.pde
@@ -49,8 +49,10 @@
 #include <errno.h>
 #include <fenv.h>
 
+#ifndef INT16_MIN
 #define INT16_MIN -32768
 #define INT16_MAX 32767
+#endif
 
 #include "LogReader.h"