fixed the counter