diff --git a/Crypto/Random.hs b/Crypto/Random.hs
--- a/Crypto/Random.hs
+++ b/Crypto/Random.hs
@@ -15,6 +15,7 @@
       EntropyPool
     , createEntropyPool
     , grabEntropy
+    , grabEntropyIO
     -- * Random generation
     , CPRG(..)
     , withRandomBytes
diff --git a/Crypto/Random/Entropy.hs b/Crypto/Random/Entropy.hs
--- a/Crypto/Random/Entropy.hs
+++ b/Crypto/Random/Entropy.hs
@@ -13,6 +13,7 @@
     , createTestEntropyPool
     , grabEntropyPtr
     , grabEntropy
+    , grabEntropyIO
     ) where
 
 import Control.Monad (when)
@@ -129,17 +130,26 @@
                     if pos == poolSize
                         then replenish poolSize backends s >> return 0
                         else return pos
-                let m = min (poolSize - wrappedPos) left 
+                let m = min (poolSize - wrappedPos) left
                 copyBytes d (s `plusPtr` wrappedPos) m
                 copyLoop (d `plusPtr` m) s (wrappedPos + m) (left - m)
 
 -- | Grab a chunk of entropy from the entropy pool.
-{-# NOINLINE grabEntropy #-}
-grabEntropy :: Int -> EntropyPool -> SecureMem
-grabEntropy n pool = unsafePerformIO $ do
+grabEntropyIO :: Int -> EntropyPool -> IO SecureMem
+grabEntropyIO n pool = do
     out <- allocateSecureMem n
     withSecureMemPtr out $ grabEntropyPtr n pool
     return $ out
+
+-- | Grab a chunk of entropy from the entropy pool.
+--
+-- Great care need to be taken here when using the output,
+-- as this use unsafePerformIO to actually get entropy.
+--
+-- Use grabEntropyIO if unsure.
+{-# NOINLINE grabEntropy #-}
+grabEntropy :: Int -> EntropyPool -> SecureMem
+grabEntropy n pool = unsafePerformIO $ grabEntropyIO n pool
 
 replenish :: Int -> [EntropyBackend] -> Ptr Word8 -> IO ()
 replenish poolSize backends ptr = loop 0 backends ptr poolSize
diff --git a/cbits/rdrand.c b/cbits/rdrand.c
--- a/cbits/rdrand.c
+++ b/cbits/rdrand.c
@@ -87,7 +87,7 @@
 		inline_rdrand_rax(tmp, ok);
 		if (!ok)
 			return (orig_len - len);
-		*buffer = tmp;
+		*((uint64_t *) buffer) = tmp;
 	}
 
 	if (len > 0) {
diff --git a/crypto-random.cabal b/crypto-random.cabal
--- a/crypto-random.cabal
+++ b/crypto-random.cabal
@@ -1,5 +1,5 @@
 Name:                crypto-random
-Version:             0.0.6
+Version:             0.0.7
 Description:         Simple cryptographic random related types
 License:             BSD3
 License-file:        LICENSE
