diff --git a/parameters/reference/cosmologyMillennium.xml b/parameters/reference/cosmologyMillennium.xml
new file mode 100644
index 0000000000..9320a3a238
--- /dev/null
+++ b/parameters/reference/cosmologyMillennium.xml
@@ -0,0 +1,16 @@
+
+
+
+ 2
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/parameters/reference/darkMatterHalosStructureNBody.xml b/parameters/reference/darkMatterHalosStructureNBody.xml
new file mode 100644
index 0000000000..508adef72e
--- /dev/null
+++ b/parameters/reference/darkMatterHalosStructureNBody.xml
@@ -0,0 +1,28 @@
+
+
+
+ 2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/parameters/reference/evolutionGalaxyFormationNBody.xml b/parameters/reference/evolutionGalaxyFormationNBody.xml
new file mode 100644
index 0000000000..6223181d2d
--- /dev/null
+++ b/parameters/reference/evolutionGalaxyFormationNBody.xml
@@ -0,0 +1,241 @@
+
+
+
+ 0.9.4
+ 2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/parameters/reference/powerSpectrumMillennium.xml b/parameters/reference/powerSpectrumMillennium.xml
new file mode 100644
index 0000000000..7f845b924c
--- /dev/null
+++ b/parameters/reference/powerSpectrumMillennium.xml
@@ -0,0 +1,27 @@
+
+
+
+ 2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/source/hot_halo.ram_pressure_force.relative_position.F90 b/source/hot_halo.ram_pressure_force.relative_position.F90
index 7d6f08dbb3..e54fbaf8d6 100644
--- a/source/hot_halo.ram_pressure_force.relative_position.F90
+++ b/source/hot_halo.ram_pressure_force.relative_position.F90
@@ -151,21 +151,25 @@ double precision function relativePositionForce(self,node) result(force)
! Find the host node. Seek the descendant of the node closest in time to our satellite node. This is necessary as satellites
! can evolve ahead of their hosts.
- basic => node%basic ()
nodeHostPrevious => node%parent
nodeHostCurrent => node%parent
- basicPrevious => nodeHostPrevious%basic()
+ basic => node %basic()
+ basicCurrent => nodeHostCurrent %basic()
+ basicPrevious => nodeHostPrevious%basic()
do while (associated(nodeHostCurrent))
- basicCurrent => nodeHostCurrent%basic()
if (basicCurrent%time() > basic%time()) exit
- basicPrevious => basicCurrent
- nodeHostPrevious => nodeHostCurrent
- nodeHostCurrent => nodeHostCurrent%parent
+ nodeHostPrevious => nodeHostCurrent
+ nodeHostCurrent => nodeHostCurrent%parent
+ basicPrevious => basicCurrent
+ if (associated(nodeHostCurrent)) &
+ & basicCurrent => nodeHostCurrent%basic ()
end do
- if ( &
- & abs(basicPrevious%time()-basic%time()) &
- & < &
- & abs(basicCurrent %time()-basic%time()) &
+ if ( &
+ & abs(basicPrevious%time()-basic%time()) &
+ & < &
+ & abs(basicCurrent %time()-basic%time()) &
+ & .or. &
+ & .not.associated(nodeHostCurrent) &
& ) then
nodeHost => nodeHostPrevious
basicHost => basicPrevious