repair looping