Fix some errors in the script.