Fix typo and validation issue in "charge_and_cast_script"