diff --git a/corsika/detail/media/ExponentialRefractiveIndex.inl b/corsika/detail/media/ExponentialRefractiveIndex.inl
index 17263125073e487400194a0a06ac34199065e4ac..c28b8e8c3e5d4cbf9e280bffc32292dc5cc660af 100644
--- a/corsika/detail/media/ExponentialRefractiveIndex.inl
+++ b/corsika/detail/media/ExponentialRefractiveIndex.inl
@@ -24,7 +24,7 @@ namespace corsika {
       , radius_(radius) {}
 
   template <typename T>
-  double ExponentialRefractiveIndex<T>::getRefractiveIndex(Point const& point) const {
+  inline double ExponentialRefractiveIndex<T>::getRefractiveIndex(Point const& point) const {
     return n0_ * exp((-lambda_) * (distance(point, center_) - radius_));
   }
 
diff --git a/corsika/media/GladstoneDaleRefractiveIndex.hpp b/corsika/media/GladstoneDaleRefractiveIndex.hpp
index 767351d8f2e57b216eba2a6e4cf68d2eebf79c4d..49a1b504c813cda72dc61a157f69b9b136a62d58 100644
--- a/corsika/media/GladstoneDaleRefractiveIndex.hpp
+++ b/corsika/media/GladstoneDaleRefractiveIndex.hpp
@@ -22,8 +22,8 @@ namespace corsika {
   class GladstoneDaleRefractiveIndex final : public T {
 
     double const seaLevelRefractiveIndex_; ///< The constant refractive index at sea level.
-    MassDensityType const seaLevelDensity_; ///< The constant mass density at sea level.
     Point const earthSurface_; ///< A point at earth's surface.
+    MassDensityType const seaLevelDensity_; ///< The constant mass density at sea level.
 //    MassDensityType ratio_; ///< (1 - seaLevelRefractiveIndex_) / seaLevelDensity_.
 
   public:
diff --git a/tests/media/testRefractiveIndex.cpp b/tests/media/testRefractiveIndex.cpp
index 3a7bc077b6dba8fdfb7fd4e291ca77027b4d641d..777624eaf8f24179c13e90586bab68473d3ad57d 100644
--- a/tests/media/testRefractiveIndex.cpp
+++ b/tests/media/testRefractiveIndex.cpp
@@ -287,7 +287,9 @@ TEST_CASE("GladstoneDaleRefractiveIndex w/ 5-layered atmosphere") {
   auto const* const universe{env.getUniverse().get()};
   auto const* node{universe->getContainingNode(ref_)};
   // get the refractive index
-  auto const rIndex{node->getModelProperties().getRefractiveIndex(ref_)};
+  auto const rIndex1{node->getModelProperties().getRefractiveIndex(ref_)};
+  auto const rIndex2{node->getModelProperties().getRefractiveIndex(surface_)};
 
-//  CHECK(rIndex - n0 == Approx(0));
+  CHECK(rIndex1 - n0 == Approx(-0.0002591034));
+  CHECK(rIndex2 - n0 == Approx(0));
 }
\ No newline at end of file