diff --git a/src/Scenery/hitlist.cxx b/src/Scenery/hitlist.cxx
index 957a4e7a9..db95620a7 100644
--- a/src/Scenery/hitlist.cxx
+++ b/src/Scenery/hitlist.cxx
@@ -6,6 +6,7 @@
 #  include <windows.h>
 #endif
 
+#include <float.h>
 #include <math.h>
 
 #include <GL/glut.h>
diff --git a/src/Scenery/tilemgr.cxx b/src/Scenery/tilemgr.cxx
index 56bd65f14..77f6c745e 100644
--- a/src/Scenery/tilemgr.cxx
+++ b/src/Scenery/tilemgr.cxx
@@ -192,6 +192,8 @@ FGTileMgr::current_elev_ssg( const Point3D& abs_view_pos,
 	scenery.cur_radius = geoc.radius();
 	sgVec3 tmp;
 	sgSetVec3(tmp, hit_list.get_normal(this_hit));
+	ssgState *IntersectedLeafState =
+	    ((ssgLeaf*)hit_list.get_entity(this_hit))->getState();
 	current_view.CurrentNormalInLocalPlane(tmp, tmp);
 	sgdSetVec3( scenery.cur_normal, tmp );
 	// cout << "NED: " << tmp[0] << " " << tmp[1] << " " << tmp[2] << endl;