diff --git a/Network/HTTP2/Priority.hs b/Network/HTTP2/Priority.hs
--- a/Network/HTTP2/Priority.hs
+++ b/Network/HTTP2/Priority.hs
@@ -11,7 +11,7 @@
 -- Repeating enqueue/dequeue probably produces
 -- 201, 201, 101, 201, 201, 101, ... based on randomness.
 --
--- Only one entry per stream should be enqueue.
+-- Only one entry per stream should be enqueued.
 -- If multiple entries for a stream are inserted, the ordering
 -- is not preserved because of the randomness.
 
diff --git a/Network/HTTP2/RandomSkewHeap.hs b/Network/HTTP2/RandomSkewHeap.hs
--- a/Network/HTTP2/RandomSkewHeap.hs
+++ b/Network/HTTP2/RandomSkewHeap.hs
@@ -31,7 +31,7 @@
 
 import Network.HTTP2.Types (Weight)
 import System.IO.Unsafe (unsafePerformIO)
-import System.Random.Mersenne (randomIO)
+import System.Random.MWC (createSystemRandom, uniformR, GenIO)
 
 data Heap a = Leaf | Node Weight -- total
                           a Weight !(Heap a) !(Heap a) deriving Show
@@ -53,11 +53,11 @@
 merge t Leaf = t
 merge Leaf t = t
 merge l@(Node tw1 a1 w1 l1 r1) r@(Node tw2 a2 w2 l2 r2)
-  | g < w1    = Node tw a1 w1 r1 $ merge l1 r
+  | g <= w1   = Node tw a1 w1 r1 $ merge l1 r
   | otherwise = Node tw a2 w2 r2 $ merge l2 l
   where
     tw = tw1 + tw2
-    g = unsafePerformIO randomIO `mod` tw
+    g = unsafePerformIO $ uniformR (1,tw) gen
 {-# NOINLINE merge #-}
 
 uncons :: Heap a -> Maybe (a, Weight, Heap a)
@@ -65,3 +65,7 @@
 uncons (Node _ a w l r) = Just (a, w, t)
   where
     !t = merge l r
+
+gen :: GenIO
+gen = unsafePerformIO createSystemRandom
+
diff --git a/http2.cabal b/http2.cabal
--- a/http2.cabal
+++ b/http2.cabal
@@ -1,5 +1,5 @@
 Name:                   http2
-Version:                1.0.0
+Version:                1.0.1
 Author:                 Kazu Yamamoto <kazu@iij.ad.jp>
 Maintainer:             Kazu Yamamoto <kazu@iij.ad.jp>
 License:                BSD3
@@ -62,7 +62,7 @@
                       , bytestring
                       , bytestring-builder
                       , containers
-                      , mersenne-random
+                      , mwc-random
                       , stm
                       , unordered-containers
 
@@ -97,7 +97,7 @@
                       , containers
                       , hex
                       , hspec >= 1.3
-                      , mersenne-random
+                      , mwc-random
                       , stm
                       , unordered-containers
                       , word8
@@ -112,7 +112,6 @@
                         HPACKSpec
                         JSON
   Build-Depends:        base >= 4 && < 5
-                      , PSQueue
                       , aeson
                       , aeson-pretty
                       , array
@@ -162,7 +161,6 @@
   Main-Is:              hpack-encode.hs
   Other-Modules:        HPACKEncode
   Build-Depends:        base >= 4 && < 5
-                      , PSQueue
                       , aeson
                       , aeson-pretty
                       , array
@@ -185,7 +183,6 @@
     Buildable:          False
   Main-Is:              hpack-debug.hs
   Build-Depends:        base >= 4 && < 5
-                      , PSQueue
                       , aeson
                       , array
                       , bytestring
@@ -207,7 +204,6 @@
     Buildable:          False
   Main-Is:              hpack-stat.hs
   Build-Depends:        base >= 4 && < 5
-                      , PSQueue
                       , aeson
                       , aeson-pretty
                       , array
