Correctly manage variable used before assignement in a If statement in a Loop
conversion from string have to be explicit to avoid conflict