bugfix: closed Lua before reporting Lua error