diff --git a/Network/Wai/Handler/CGI.hs b/Network/Wai/Handler/CGI.hs
--- a/Network/Wai/Handler/CGI.hs
+++ b/Network/Wai/Handler/CGI.hs
@@ -98,5 +98,5 @@
     helper' [] = []
 cleanupVarName "CONTENT_TYPE" = ReqContentType
 cleanupVarName "CONTENT_LENGTH" = ReqContentLength
-cleanupVarName "SCRIPT_NAME" = RequestHeader $ B.pack "CGI-Script-Name"
+cleanupVarName "SCRIPT_NAME" = requestHeaderFromBS $ B.pack "CGI-Script-Name"
 cleanupVarName x = requestHeaderFromBS $ B.pack x -- FIXME remove?
diff --git a/wai-extra.cabal b/wai-extra.cabal
--- a/wai-extra.cabal
+++ b/wai-extra.cabal
@@ -1,5 +1,5 @@
 Name:                wai-extra
-Version:             0.0.0.1
+Version:             0.0.0.2
 Synopsis:            Provides some basic WAI handlers and middleware.
 Description:         The goal here is to provide common features without many dependencies.
 License:             BSD3
@@ -15,9 +15,9 @@
 Library
   Build-Depends:     base >= 3 && < 5,
                      bytestring >= 0.9 && < 0.10,
-                     wai >= 0.0.0 && < 0.1,
+                     wai >= 0.0.0 && < 0.3,
                      split >= 0.1.2 && < 0.2,
-                     web-encodings >= 0.2.3 && < 0.5,
+                     web-encodings >= 0.2.3 && < 0.3,
                      old-locale >= 1.0 && < 1.1,
                      time >= 1.1.4 && < 1.2,
                      clientsession >= 0.2.0 && < 0.3,
