Fix spec script errors