Lua script fix