Fixed Lua 5.1 incompatibility