diff --git a/Network/Fancy.hsc b/Network/Fancy.hsc
--- a/Network/Fancy.hsc
+++ b/Network/Fancy.hsc
@@ -34,7 +34,7 @@
 import Foreign.ForeignPtr.Unsafe (unsafeForeignPtrToPtr)
 import Numeric(showHex)
 import System.IO(Handle, hClose, IOMode(ReadWriteMode))
-import System.IO.Unsafe(unsafeInterleaveIO)
+import System.IO.Unsafe
 import System.Posix.Internals hiding(c_close)
 #if __GLASGOW_HASKELL__ > 610
 import GHC.IO.Device
diff --git a/Network/Fancy/Error.hs b/Network/Fancy/Error.hs
--- a/Network/Fancy/Error.hs
+++ b/Network/Fancy/Error.hs
@@ -41,8 +41,8 @@
 instance Exception NetworkException
 
 instance Show NetworkException where
-    show (SocketException s _ v) = s ++ ": " ++ strerror v
-    show (GetAdddrInfoException v) = unsafePerformIO $ gaiError v
+    show (SocketException s (Socket fd) v) = s ++ " (" ++ show fd ++  "): " ++ strerror v
+    show (GetAdddrInfoException v) = "getaddrinfo: " ++ unsafePerformIO (gaiError v)
     show UnsupportedAddressFamilyException = "Unsupported address family"
     show NoSuchHostException = "No such host"
     show AddressTooLongException = "Network address too long"
diff --git a/Setup.hs b/Setup.hs
--- a/Setup.hs
+++ b/Setup.hs
@@ -1,12 +1,4 @@
 #!/usr/bin/env runhaskell
 import Distribution.Simple
-import System.Cmd
-import System.Directory
 
-main = defaultMainWithHooks simpleUserHooks{ runTests = \_ _ _ _ -> rt }
-
-rt :: IO ()
-rt = do system "ghc --make -threaded test.hs -o test"
-        system "./test"
-        mapM_ removeFile ["test","test.hi","test.o"]
-        return ()
+main = defaultMain
diff --git a/cbits.c b/cbits.c
--- a/cbits.c
+++ b/cbits.c
@@ -31,6 +31,7 @@
 int getsockopt_error(int fd) {
   int estat, res;
   socklen_t len = sizeof(int);
+  estat = 0;
 #ifdef WINDOWS
   res = getsockopt(fd, SOL_SOCKET, SO_ERROR, (char*)&estat, &len);
 #else
diff --git a/changelog.md b/changelog.md
--- a/changelog.md
+++ b/changelog.md
@@ -1,5 +1,13 @@
 # network-fancy changelog
 
+## Version 0.2.2 2014-12-13
+
+- Modify Setup.hs to keep nix happy, closes #4
+- Depend on pthread always on linux
+- Show more informative error strings
+- Wibble imports
+- ensure estat is zero if getsockopt is broken
+
 ## Version 0.2.1 2014-12-09
 
 - Fix strerror_r symbol mangling with glibc
diff --git a/network-fancy.cabal b/network-fancy.cabal
--- a/network-fancy.cabal
+++ b/network-fancy.cabal
@@ -1,5 +1,5 @@
 name: network-fancy
-version: 0.2.1
+version: 0.2.2
 cabal-version: >=1.8
 build-type: Simple
 license: BSD3
@@ -36,6 +36,7 @@
             extra-libraries: socket
         if os(linux)
             cpp-options: -DLINUX=LINUX
+            extra-libraries: pthread
         exposed: True
         buildable: True
         cpp-options: -DCALLCONV=ccall -DSAFE_ON_WIN=unsafe
