Lua protection and other stuff.