Fix possible crash on Lua error report