Fixed compatability with Lua 5.1