Fixed error on initializing the counter, fixed typo.