diff --git a/Hack/Handler/EvHTTP.hsc b/Hack/Handler/EvHTTP.hsc
--- a/Hack/Handler/EvHTTP.hsc
+++ b/Hack/Handler/EvHTTP.hsc
@@ -10,6 +10,7 @@
 
 import Control.Concurrent
 import Control.Concurrent.Chan
+import qualified Data.ByteString as BS
 
 import Control.Monad
 import Data.ByteString.Class
@@ -269,8 +270,9 @@
     inputBufferP <- ((#peek struct evhttp_request, input_buffer) reqP :: IO BufPtr)
     bufP <- ((#peek struct evbuffer, buffer) inputBufferP :: IO CString)
     off <- fmap fromIntegral $ ((#peek struct evbuffer, off) inputBufferP :: IO CSize)
-    fmap toLazyByteString $ peekCStringLen (bufP, off)
+    fmap toLazyByteString $ BS.packCStringLen (bufP, off)
 
+-- Start sending the response
 sendResponse :: ReqPtr -> Response -> IO ()
 sendResponse reqP response = do
     forM_ (headers response) $ \(key, val) -> do
@@ -278,10 +280,11 @@
             withCString val $ \v' -> do
                 outHeadersP <- (#peek struct evhttp_request, output_headers) reqP
                 addHeader outHeadersP k' v'
-    let body' = (fromLazyByteString $ body response)
-    withCString body' $ \bodyBytes -> do
+    let body' = toStrictByteString $ body response
+    let bodyLength = fromIntegral $ BS.length body'
+    BS.useAsCString (toStrictByteString $ body response) $ \bodyBytes -> do
         buf <- bufNew
-        bufAdd buf bodyBytes $ fromIntegral . length $ body'
+        bufAdd buf bodyBytes bodyLength
         let msg = statusMessage $ status response
         let code = fromIntegral $ status response
         withCString msg $ \msg' -> do
diff --git a/Setup.hs b/Setup.hs
--- a/Setup.hs
+++ b/Setup.hs
@@ -1,2 +1,6 @@
+#!/usr/bin/env /usr/bin/runhaskell
 import Distribution.Simple
+
 main = defaultMain
+
+
diff --git a/hack-handler-evhttp.cabal b/hack-handler-evhttp.cabal
--- a/hack-handler-evhttp.cabal
+++ b/hack-handler-evhttp.cabal
@@ -1,5 +1,5 @@
 Name:                 hack-handler-evhttp
-Version:              2009.8.2
+Version:              2009.8.4
 Build-type:           Simple
 Synopsis:             Hack EvHTTP (libevent) Handler
 Description:          Hack EvHTTP (libevent) Handler
