fixed the script error