Fix multiple  variables in various for loops.