small changes to LuaState