date counter fix