Lua: Fix type confusion between signed and unsigned