Fix the script to match code