diff --git a/LDAP.cabal b/LDAP.cabal
--- a/LDAP.cabal
+++ b/LDAP.cabal
@@ -1,11 +1,11 @@
 Name: LDAP
-Version: 0.6.7
+Version: 0.6.8
 License: BSD3
-Maintainer: John Goerzen <jgoerzen@complete.org>
-Author: John Goerzen
+Maintainer: Edward Z. Yang <ezyang@mit.edu>
+Author: John Goerzen, Edward Z. Yang
 Stability: Beta
-Copyright: Copyright (c) 2005-2010 John Goerzen
-homepage: http://software.complete.org/ldap-haskell
+Copyright: Copyright (c) 2005-2012 John Goerzen, Edward Z. Yang
+homepage: https://github.com/ezyang/ldap-haskell
 Category: Network
 Synopsis: Haskell binding for C LDAP API
 Description: This package provides LDAP interface code for Haskell programs,
@@ -37,7 +37,7 @@
 
   build-depends: base >= 4 && <5
 
-  Extra-Libraries: ldap
+  Extra-Libraries: ldap, lber
 
   GHC-Options: -O2
   -- CC-Options: -Iglue
@@ -53,7 +53,7 @@
     Buildable: True
   else
     Buildable: False
-  Extra-Libraries: ldap
+  Extra-Libraries: ldap, lber
   Main-Is: runtests.hs
   if os(openbsd)
     CC-Options: -DLDAP_X_PROXY_AUTHZ_FAILURE=LDAP_PROXY_AUTHZ_FAILURE
diff --git a/LDAP/Init.hsc b/LDAP/Init.hsc
--- a/LDAP/Init.hsc
+++ b/LDAP/Init.hsc
@@ -27,6 +27,7 @@
 where
 
 import Foreign.Ptr
+import Foreign.ForeignPtr
 import Foreign.C.String
 import Foreign.Marshal.Alloc
 import Foreign.Storable
@@ -43,6 +44,11 @@
     with ((#{const LDAP_VERSION3})::LDAPInt) $ \copt ->
     ldap_set_option cld #{const LDAP_OPT_PROTOCOL_VERSION} (castPtr copt)
 
+ldapSetRestart :: LDAPPtr -> IO LDAPInt
+ldapSetRestart cld =
+    with ((#{const LDAP_OPT_ON})::LDAPInt) $ \copt ->
+    ldap_set_option cld #{const LDAP_OPT_RESTART} (castPtr copt)
+
 {- | Preferred way to initialize a LDAP connection. 
 The default port is given in 'LDAP.Constants.ldapPort'.
 
@@ -52,9 +58,10 @@
          -> IO LDAP             -- ^ New LDAP Obj
 ldapInit host port =
     withCString host $ \cs ->
-       do cld <- cldap_init cs port
-          rv <- fromLDAPPtr "ldapInit" (return cld)
-          ldapSetVersion3 cld
+       do rv <- fromLDAPPtr "ldapInit" (cldap_init cs port)
+          withForeignPtr rv $ \cld -> do
+              ldapSetVersion3 cld
+              ldapSetRestart cld
           return rv
 
 {- | Like 'ldapInit', but establish network connection immediately. -}
@@ -63,7 +70,9 @@
             -> IO LDAP          -- ^ New LDAP Obj
 ldapOpen host port =
     withCString host (\cs ->
-                      fromLDAPPtr "ldapOpen" $ cldap_open cs port)
+        do rv <- fromLDAPPtr "ldapOpen" (cldap_open cs port)
+           withForeignPtr rv ldapSetRestart
+           return rv)
 
 {- | Like 'ldapInit', but accepts a URI (or whitespace/comma separated
 list of URIs) which can contain a schema, a host and a port.  Besides
@@ -75,10 +84,11 @@
     withCString uri $ \cs ->
     alloca $ \pp -> do
     r <- ldap_initialize pp cs
-    p <- peek pp
-    ldap <- fromLDAPPtr "ldapInitialize" (return p)
+    ldap <- fromLDAPPtr "ldapInitialize" (peek pp)
     _ <- checkLE "ldapInitialize" ldap (return r)
-    ldapSetVersion3 p
+    withForeignPtr ldap $ \p -> do
+        ldapSetVersion3 p
+        ldapSetRestart p
     return ldap
 
 
