Fix timer and counter