diff --git a/Text/Dot.hs b/Text/Dot.hs
--- a/Text/Dot.hs
+++ b/Text/Dot.hs
@@ -168,7 +168,8 @@
                          ]
     let fm = M.fromList (nodeTab ++ otherTab)
     sequence_ [ (fm M.! src) .->. (fm M.! dst)
-              | (src,b) <- assocs
-              , dst     <- outFn b
+              | (dst,b) <- assocs
+              , src     <- outFn b
               ]
     return ()
+
diff --git a/dotgen.cabal b/dotgen.cabal
--- a/dotgen.cabal
+++ b/dotgen.cabal
@@ -1,5 +1,5 @@
 Name:                dotgen
-Version:             0.3
+Version:             0.4
 Synopsis:            A simple interface for building .dot graph files.
 Description:         This package provides a simple interface for building .dot graph files,
 		     for input into the dot and graphviz tools. 
@@ -9,7 +9,7 @@
 License-file:        LICENSE
 Author:              Andy Gill
 Maintainer:          Andy Gill <andygill@ku.edu>
-Build-Depends:       base, containers
+Build-Depends:       base >=3 && <5, containers
 Exposed-Modules:     Text.Dot
 Stability:	     alpha
 build-type: 	     Simple
@@ -19,4 +19,5 @@
 hs-source-dirs:	     test, .
 Main-is:             DotTest.hs
 buildable: False
+
 
