Prevented infinite loop on incorrect syntax in repeat script.