This will not break the nested loop: how about using return?