Corrected the errors in the script.