diff --git a/BerkeleyDBXML.cabal b/BerkeleyDBXML.cabal
--- a/BerkeleyDBXML.cabal
+++ b/BerkeleyDBXML.cabal
@@ -1,8 +1,8 @@
 name: BerkeleyDBXML
-version: 0.6.1
+version: 0.6.2
 license: BSD3
 license-file: LICENSE
-cabal-version: >= 1.4
+cabal-version: >= 1.6
 copyright: (c) 2009 Stephen Blackheath
 author: Stephen Blackheath
 maintainer: http://blacksapphire.com/antispam/
@@ -35,7 +35,7 @@
     exposed-modules: Database.Berkeley.DbXml
     c-sources: Database/Berkeley/dbxml_helper.cpp
 
-    build-depends: base >= 4, bytestring >= 0.9, BerkeleyDB >= 0.6
+    build-depends: base == 4.*, bytestring >= 0.9, BerkeleyDB >= 0.7.1
     include-dirs: Database/Berkeley/
     extra-libraries: db, dbxml, db_cxx, xqilla, xerces-c, xml2
     ghc-options: -pgml c++
diff --git a/Database/Berkeley/dbxml_helper.cpp b/Database/Berkeley/dbxml_helper.cpp
--- a/Database/Berkeley/dbxml_helper.cpp
+++ b/Database/Berkeley/dbxml_helper.cpp
@@ -138,6 +138,11 @@
 {
     UNWRAP_DBTXN();
     try {
+        void detach_DbTxn(DbTxn** dbtxnp);  // Defined in Berkeley DB
+
+        detach_DbTxn(dbtxnp);  // Detach the DbTxn so that Berkeley DB doesn't
+                               // try to clean it up by running DbTxn_abort in
+                               // its finalizer.
         XmlTransaction t = mgr->mgr.createTransaction(dbtxn);
         *trans = new XmlTransaction(t);
         return 0;
diff --git a/README b/README
--- a/README
+++ b/README
@@ -25,16 +25,16 @@
 
 To install, use the standard Cabal install procedure:
 
-sudo cabal install
+cabal install
 
 or
 
-sudo runhaskell Setup.hs install
+runhaskell Setup.hs install
 
 If Berkeley DB or DB XML is not installed in the default location of /usr or
 /usr/local, you will need to specify the paths in this way:
 
-sudo cabal install \
+cabal install \
     --extra-include-dirs=/usr/local/dbxml-2.4.16/include/ \
     --extra-include-dirs=/usr/local/dbxml-2.4.16/include/dbxml/ \
     --extra-lib-dirs=/usr/local/dbxml-2.4.16/lib/
