diff --git a/postgres-embedded.cabal b/postgres-embedded.cabal
--- a/postgres-embedded.cabal
+++ b/postgres-embedded.cabal
@@ -1,5 +1,5 @@
 name:                postgres-embedded
-version:             0.1.0
+version:             0.1.1
 description:         Library for easily running embedded PostgreSQL server for tests
 homepage:            https://github.com/ilya-murzinov/postgres-embedded
 license:             MIT
@@ -22,8 +22,7 @@
                      , directory
                      , filepath
                      , shell-conduit
-                     , HDBC
-                     , HDBC-postgresql
+                     , network
   ghc-options:         -Wall
   default-language:    Haskell2010
 
diff --git a/src/Database/PostgreSQL/Embedded/Postgres.hs b/src/Database/PostgreSQL/Embedded/Postgres.hs
--- a/src/Database/PostgreSQL/Embedded/Postgres.hs
+++ b/src/Database/PostgreSQL/Embedded/Postgres.hs
@@ -5,16 +5,17 @@
     ) where
 
 import           Control.Concurrent                    (threadDelay)
-import           Control.Exception                     (try)
+import           Control.Exception                     (SomeException, try)
 import           Data.Conduit.Shell                    (rm, run, shell)
 import           Data.List                             (isInfixOf)
 import           Data.Monoid                           ((<>))
-import           Database.HDBC                         (SqlError)
-import           Database.HDBC.PostgreSQL              (Connection,
-                                                        connectPostgreSQL)
+import           Network                               (PortID (..), connectTo)
 import           System.FilePath.Posix                 ((</>))
 import           System.Info                           (os)
+import           System.IO                             (Handle)
 
+
+
 import           Database.PostgreSQL.Embedded.Download
 import           Database.PostgreSQL.Embedded.Types
 
@@ -43,11 +44,10 @@
 checkPostgresStarted config secs = checkPostgresStarted_ config secs >>= \_ -> return ()
     where
         checkPostgresStarted_ :: DBConfig -> Int -> IO Bool
-        checkPostgresStarted_ (DBConfig p u) n = do
-            let connStr = "postgres://" <> u <> "@localhost:" <> (show p) <> "/postgres"
+        checkPostgresStarted_ (DBConfig p _) n = do
             let oneSec = 1000000
 
-            res <- try $ connectPostgreSQL connStr :: IO (Either SqlError Connection)
+            res <- try $ connectTo "localhost" (PortNumber $ fromInteger p) :: IO (Either SomeException Handle)
             case res of
                 Left e -> if (n > 0) then
                     print e >>=
diff --git a/src/Database/PostgreSQL/Embedded/Types.hs b/src/Database/PostgreSQL/Embedded/Types.hs
--- a/src/Database/PostgreSQL/Embedded/Types.hs
+++ b/src/Database/PostgreSQL/Embedded/Types.hs
@@ -21,6 +21,6 @@
 }
 
 data DBConfig = DBConfig {
-    port     :: Int,
+    port     :: Integer,
     username :: String
 }
diff --git a/test/Spec.hs b/test/Spec.hs
--- a/test/Spec.hs
+++ b/test/Spec.hs
@@ -1,5 +1,3 @@
-import           System.Info                  as SI (os)
-
 import           Database.PostgreSQL.Embedded
 
 main :: IO ()
@@ -13,4 +11,4 @@
 
     -- Start Postgres with cached distribution
     rc1 <- startPostgres sConfig dConfig
-    stopPostgres rc
+    stopPostgres rc1
