properly reset counters