Fixing infinite count.