diff --git a/NEWS b/NEWS
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+Changes in 0.4.1
+* Require cabal >= 1.8
+* Fix framework detection bug in configure script on Mac OS
+
 Changes in 0.4
 * Switch to native (Cabal-based) configure
 * Tracy Wadleigh added support for quasi-random number sequences
diff --git a/Setup.lhs b/Setup.lhs
--- a/Setup.lhs
+++ b/Setup.lhs
@@ -8,10 +8,8 @@
 > import Distribution.Simple.Program
 > import Distribution.Verbosity
 > 
-> import Data.Char (isSpace)
 > import Data.List (findIndices)
 > 
-> import Control.Monad
 > 
 > main = defaultMainWithHooks simpleUserHooks {
 >   hookedPrograms = [gslconfigProgram],
@@ -43,7 +41,7 @@
 >   return emptyBuildInfo {
 >       frameworks    =  [ libs !! (i+1)
 >                        | i <- findIndices (== "-framework") libs
->                        , i < length libs ]
+>                        , i + 1 < length libs ]
 >     , extraLibs     = flag "-l" libs
 >     , extraLibDirs  = flag "-L" libs
 >     , includeDirs   = flag "-I" cflags
diff --git a/gsl-random.cabal b/gsl-random.cabal
--- a/gsl-random.cabal
+++ b/gsl-random.cabal
@@ -1,5 +1,5 @@
 name:            gsl-random
-version:         0.4
+version:         0.4.1
 homepage:        http://github.com/patperry/gsl-random
 synopsis:        Bindings the the GSL random number generation facilities.
 description:
@@ -14,7 +14,7 @@
 author:          Patrick Perry,
                  Tracy Wadleigh
 maintainer:      Patrick Perry <patperry@gmail.com>
-cabal-version:   >= 1.4.0
+cabal-version:   >= 1.8.0
 build-type:      Custom
 tested-with:     GHC == 6.12.3
 
