Stop the each loop

Stopping the loop at the end allow the stop of the function and multiple function call with different sources and targets