aligned with Lua 5.2.2