Fixing script error