Issue #31: fix Lua stack clean up