diff --git a/Tests.hs b/Tests.hs
--- a/Tests.hs
+++ b/Tests.hs
@@ -18,8 +18,7 @@
 import Network.AWS.S3Bucket
 import Data.Maybe (fromJust)
 import qualified Data.ByteString.Lazy.Char8 as L
-import Control.Exception(finally)
-import IO(bracket)
+import Control.Exception(finally,bracket)
 import Control.Concurrent(threadDelay)
 import Data.List.Utils(hasKeyAL)
 import Test.HUnit
diff --git a/hS3.cabal b/hS3.cabal
--- a/hS3.cabal
+++ b/hS3.cabal
@@ -1,5 +1,5 @@
 Name:           hS3
-Version:        0.5.8
+Version:        0.5.9
 License:        BSD3
 License-file:   LICENSE
 Cabal-Version: >= 1.6
@@ -26,17 +26,24 @@
                     examples/getObject.hs
                     examples/listObjects.hs
                     examples/uploadFile.hs
+Flag network-uri
+  description: Get Network.URI from the network-uri package
+  default: True
 
 source-repository head
   type:     git
-  location: http://github.com/errge/hS3
+  location: https://github.com/scsibug/hS3
 
 Library
-
   Build-depends:  base >= 3 && < 5, HTTP >= 4000.0.0, Crypto >= 4.1.0, hxt >= 9.0.0 && < 10, network,
                 regex-compat, old-time, random, old-locale, dataenc, utf8-string, bytestring,
                 MissingH >= 0.18.6
 
+  if flag(network-uri)
+    Build-depends: network-uri >= 2.6, network >= 2.6
+  else
+    Build-depends: network-uri < 2.6, network < 2.6
+
   Exposed-modules:
         Network.AWS.S3Object,
         Network.AWS.S3Bucket,
@@ -44,6 +51,7 @@
         Network.AWS.AWSConnection,
         Network.AWS.Authentication,
         Network.AWS.ArrowUtils
+
 
 Executable     hs3
   main-is:        hS3.hs
