Fix the script errors