Updated for Lua 1.9