Variable change

Counter variable changed to local scope.