Oh, yes. Thank you. That was a really beginner mistake.
But why the script crashed in the last loop and not already in the first ?