fix the counter