For any Repeat instruction there's a little tick box on it. Turn it on and if any instruction inside it fails it will quit the Repeat and carry on.
Thanks!