fix lua script