fix scripting errors