Fixed memory leaks (lua_close)