fix invalid memory access in ~LuaWrapper #96