bad script repair