corrected script errors