Adapting to Lua 5.2