diff --git a/Changelog b/Changelog
--- a/Changelog
+++ b/Changelog
@@ -1,3 +1,10 @@
+2014-02-25  David Feng <davidxifeng@gmail.com>
+
+             * cbits/pbc-lua.c: (bugfix) revert last commit to fix the bug
+
+             * src/Scripting/Lua/Pbc.hs: (bugfix) call c_luaopen_pbc with cpcall
+
+
 2014-02-24  David Feng <davidxifeng@gmail.com>
 
              * cbits/pbc-lua.c: add the missing lua_pop call after luaL_register
diff --git a/cbits/pbc-lua.c b/cbits/pbc-lua.c
--- a/cbits/pbc-lua.c
+++ b/cbits/pbc-lua.c
@@ -1093,7 +1093,6 @@
 
 	luaL_checkversion(L);
 	luaL_newlib(L, reg);
-	lua_pop(L, 1);
 
 	return 1;
 }
diff --git a/pbc4hs.cabal b/pbc4hs.cabal
--- a/pbc4hs.cabal
+++ b/pbc4hs.cabal
@@ -1,5 +1,5 @@
 name:                pbc4hs
-version:             0.1.1.4
+version:             0.1.1.5
 synopsis:            pbc for HsLua
 description:         pbc wrapper for HsLua
 license:             BSD3
diff --git a/src/Scripting/Lua/Pbc.hs b/src/Scripting/Lua/Pbc.hs
--- a/src/Scripting/Lua/Pbc.hs
+++ b/src/Scripting/Lua/Pbc.hs
@@ -10,17 +10,19 @@
 
 import Scripting.Lua
 import Data.String.QQ
+import Foreign
+import Foreign.C
 
-foreign import ccall "luaopen_protobuf_c" c_luaopen_pbc :: LuaState -> IO ()
+foreign import ccall "&luaopen_protobuf_c" p_c_luaopen_pbc ::   FunPtr (LuaState -> IO CInt)
 
 -- | open pbc Lua C binding library
 openPbc :: LuaState -> IO ()
-openPbc = c_luaopen_pbc
+openPbc l = cpcall l p_c_luaopen_pbc nullPtr >> return ()
 
 -- | open pbc Lua library
 openLuaPbc :: LuaState -> IO ()
 openLuaPbc l = do
-    c_luaopen_pbc l
+    openPbc l
     loadstring l protobuf_lua "protobuf.lua"
     call l 0 0
 
