fixed the script issue