fix Lua type errors