Correcting scritps for repetition