Fixing for loop snippet.