added mutex for Lua execution