Fix uninitialized counter variable.