Clean variables set in the loop inside the loop to prevent data leakage