fixed the script problem