diff --git a/epoll.cabal b/epoll.cabal
--- a/epoll.cabal
+++ b/epoll.cabal
@@ -1,5 +1,5 @@
 name:               epoll
-version:            0.2.1
+version:            0.2.2
 synopsis:           epoll bindings
 description:        Bindings to epoll, a Linux specific I/O
                     event notication facility (cf. man epoll(7)).
@@ -9,6 +9,7 @@
 author:             Toralf Wittner
 maintainer:         toralf.wittner@gmail.com
 copyright:          Copyright (c) 2009 Toralf Wittner
+homepage:           http://github.com/twittner/epoll/
 stability:          experimental
 tested-With:        GHC == 6.10.4
 cabal-version:      >= 1.6.0
diff --git a/src/System/Linux/Epoll/Buffer.hs b/src/System/Linux/Epoll/Buffer.hs
--- a/src/System/Linux/Epoll/Buffer.hs
+++ b/src/System/Linux/Epoll/Buffer.hs
@@ -151,14 +151,14 @@
 
 -- | Exception safe wrapper which creates an IBuffer, passes it to the provided
 -- function and closes it afterwards.
-withIBuffer :: BufElem a => Runtime -> Fd -> (IBuffer a -> IO ()) -> IO ()
+withIBuffer :: BufElem a => Runtime -> Fd -> (IBuffer a -> IO b) -> IO b
 withIBuffer r fd = bracket (createIBuffer r fd) (closeIBuffer r)
 
 -- | Exception safe wrapper which creates an OBuffer, passes it to the provided
 -- function and flushes and closes it afterwards.
-withOBuffer :: BufElem a => Runtime -> Fd -> (OBuffer a -> IO ()) -> IO ()
+withOBuffer :: BufElem a => Runtime -> Fd -> (OBuffer a -> IO b) -> IO b
 withOBuffer r fd f = bracket (createOBuffer r fd) (closeOBuffer r) $ \b ->
-    f b >> flushBuffer b
+    f b >>= \v -> flushBuffer b >> return v
 
 -- | Blocking read. Lazily returns all available contents from 'IBuffer'.
 readBuffer :: BufElem a => IBuffer a -> IO a
