Index: /trunk/eraser/Eraser.Manager/ManagerLibrary.cs
===================================================================
--- /trunk/eraser/Eraser.Manager/ManagerLibrary.cs	(revision 2566)
+++ /trunk/eraser/Eraser.Manager/ManagerLibrary.cs	(revision 2567)
@@ -44,8 +44,10 @@
 			Instance = this;
 			Settings = new ManagerSettings(persistentStore);
-			entropyPoller = new EntropyPoller();
 			Host.Initialise(persistentStore);
 			Host.Instance.PluginLoad += OnPluginLoad;
 			Host.Instance.Load();
+
+			//Initialise the Entropy Poller last since it depends on the Host.
+			entropyPoller = new EntropyPoller();
 		}
 
Index: /trunk/eraser/Eraser.Manager/EntropyPoller.cs
===================================================================
--- /trunk/eraser/Eraser.Manager/EntropyPoller.cs	(revision 2566)
+++ /trunk/eraser/Eraser.Manager/EntropyPoller.cs	(revision 2567)
@@ -49,4 +49,11 @@
 			Pool = new byte[sizeof(uint) << 7];
 
+			//Handle the Entropy Source Registered event.
+			Host.Instance.EntropySources.Registered += OnEntropySourceRegistered;
+
+			//Meanwhile, add all entropy sources already registered.
+			foreach (IEntropySource source in Host.Instance.EntropySources)
+				AddEntropySource(source);
+
 			//Then start the thread which maintains the pool.
 			Thread = new Thread(Main);
@@ -78,5 +85,5 @@
 				Thread.Sleep(2000 + (int)(DateTime.Now.Ticks % 2999));
 
-				// Send entropy to the PRNGs for new seeds.
+				//Send entropy to the PRNGs for new seeds.
 				DateTime now = DateTime.Now;
 				if (now - lastAddedEntropy > managerEntropySpan)
@@ -94,4 +101,15 @@
 		{
 			Thread.Abort();
+		}
+
+		/// <summary>
+		/// Handles the OnEntropySourceRegistered event so we can register them with
+		/// ourselves.
+		/// </summary>
+		/// <param name="sender">The object which was registered.</param>
+		/// <param name="e">Event argument.</param>
+		private void OnEntropySourceRegistered(object sender, EventArgs e)
+		{
+			AddEntropySource((IEntropySource)sender);
 		}
 
@@ -177,6 +195,6 @@
 				for (; i < Pool.Length - hashSize; i += hashSize)
 					Buffer.BlockCopy(hash.ComputeHash(Pool, i,
-						i + mixBlockSize >= Pool.Length ? Pool.Length - i : mixBlockSize),
-						0, Pool, i, i + hashSize >= Pool.Length ? Pool.Length - i : hashSize);
+						Math.Min(mixBlockSize, Pool.Length - i)), 0, Pool, i,
+						Math.Min(hashSize, Pool.Length - i));
 
 				//Mix the remaining blocks which require copying from the front
@@ -184,11 +202,11 @@
 				for (; i < Pool.Length; i += hashSize)
 				{
-					Buffer.BlockCopy(Pool, i, combinedBuffer, 0, Pool.Length - i);
-
-					Buffer.BlockCopy(Pool, 0, combinedBuffer, Pool.Length - i,
-								mixBlockSize - (Pool.Length - i));
+					int remainder = Pool.Length - i;
+					Buffer.BlockCopy(Pool, i, combinedBuffer, 0, remainder);
+					Buffer.BlockCopy(Pool, 0, combinedBuffer, remainder,
+						mixBlockSize - remainder);
 
 					Buffer.BlockCopy(hash.ComputeHash(combinedBuffer, 0, mixBlockSize), 0,
-						Pool, i, Pool.Length - i > hashSize ? hashSize : Pool.Length - i);
+						Pool, i, Math.Min(hashSize, remainder));
 				}
 			}
@@ -222,5 +240,8 @@
 						//Bring the pool position back to the front if we are at our end
 						if (PoolPosition >= Pool.Length)
+						{
 							PoolPosition = 0;
+							MixPool();
+						}
 
 						int amountToMix = Math.Min(size, Pool.Length - PoolPosition);
@@ -228,4 +249,5 @@
 						mpEntropy = mpEntropy + amountToMix;
 						size -= amountToMix;
+						PoolPosition += amountToMix;
 					}
 				}
