fixed integer overflow in counters
Merge pull request #52 from afontenot/overflow_fix

fixed integer overflow in counters