diff --git a/Network/JsonRpc.hs b/Network/JsonRpc.hs
--- a/Network/JsonRpc.hs
+++ b/Network/JsonRpc.hs
@@ -8,6 +8,7 @@
 
 import Network.JsonRpc.Interface
 import Network.JsonRpc.Data
+import Network.JsonRpc.Arbitrary()
 
 -- $introduction
 --
diff --git a/Network/JsonRpc/Arbitrary.hs b/Network/JsonRpc/Arbitrary.hs
--- a/Network/JsonRpc/Arbitrary.hs
+++ b/Network/JsonRpc/Arbitrary.hs
@@ -1,6 +1,5 @@
 {-# LANGUAGE FlexibleInstances #-}
 {-# OPTIONS_GHC -fno-warn-orphans #-}
--- | Arbitrary instances and data types for use in test suites.
 module Network.JsonRpc.Arbitrary where
 
 import Control.Applicative
@@ -8,7 +7,7 @@
 import qualified Data.HashMap.Strict as M
 import Data.Text (Text)
 import qualified Data.Text as T
-import Network.JsonRpc
+import Network.JsonRpc.Data
 import Test.QuickCheck.Arbitrary
 import Test.QuickCheck.Gen
 
@@ -48,12 +47,14 @@
     arbitrary = oneof [IdInt <$> arbitrary, IdTxt <$> arbitrary]
 
 instance Arbitrary Value where
-    arbitrary = resize 10 $ oneof [val, lsn, objn] where
-        val = oneof [ toJSON <$> (arbitrary :: Gen String)
-                    , toJSON <$> (arbitrary :: Gen Int)
-                    , toJSON <$> (arbitrary :: Gen Double)
-                    , toJSON <$> (arbitrary :: Gen Bool)
-                    ]
+    arbitrary = resize 10 $ oneof [nonull, lsn, objn] where
+        nonull = oneof
+            [ toJSON <$> (arbitrary :: Gen String)
+            , toJSON <$> (arbitrary :: Gen Int)
+            , toJSON <$> (arbitrary :: Gen Double)
+            , toJSON <$> (arbitrary :: Gen Bool)
+            ]
+        val = oneof [ nonull, return Null ]
         ls   = toJSON <$> listOf val
         obj  = toJSON . M.fromList <$> listOf ps
         ps   = (,) <$> (arbitrary :: Gen String) <*> oneof [val, ls]
diff --git a/Network/JsonRpc/Interface.hs b/Network/JsonRpc/Interface.hs
--- a/Network/JsonRpc/Interface.hs
+++ b/Network/JsonRpc/Interface.hs
@@ -276,9 +276,10 @@
         withAsync (outSrc $$ snk) $ \o ->
             withAsync (runReaderT processIncoming qs) $ const $ do
                 a <- runReaderT f qs
-                liftIO . atomically . closeTBMChan $ outCh qs
-                _ <- liftIO $ wait o
-                return a
+                liftIO $ do
+                    atomically . closeTBMChan $ outCh qs
+                    _ <- wait o
+                    return a
 
 
 cr :: Monad m => Conduit ByteString m ByteString
diff --git a/json-rpc.cabal b/json-rpc.cabal
--- a/json-rpc.cabal
+++ b/json-rpc.cabal
@@ -1,5 +1,5 @@
 name:                   json-rpc
-version:                0.6.1.0
+version:                0.6.2.0
 synopsis:               Fully-featured JSON-RPC 2.0 library
 description:
   This JSON-RPC library is fully-compatible with JSON-RPC 2.0 and 1.0. It
@@ -24,13 +24,13 @@
 source-repository this
   type:                 git
   location:             https://github.com/xenog/json-rpc.git
-  tag:                  0.6.1.0
+  tag:                  0.6.2.0
 
 library
-  exposed-modules:      Network.JsonRpc,
-                        Network.JsonRpc.Arbitrary
+  exposed-modules:      Network.JsonRpc
   other-modules:        Network.JsonRpc.Data,
                         Network.JsonRpc.Interface
+                        Network.JsonRpc.Arbitrary
   build-depends:        base                        >= 4.6      && < 5,
                         aeson                       >= 0.7      && < 0.10,
                         attoparsec                  >= 0.11,
diff --git a/test/Network/JsonRpc/Tests.hs b/test/Network/JsonRpc/Tests.hs
--- a/test/Network/JsonRpc/Tests.hs
+++ b/test/Network/JsonRpc/Tests.hs
@@ -17,7 +17,6 @@
 import Data.Aeson.Types
 import Data.Maybe
 import Network.JsonRpc
-import Network.JsonRpc.Arbitrary()
 import Test.QuickCheck
 import Test.QuickCheck.Monadic
 import Test.Framework
