improve support for Lua 5.2