fix time counter overflow bug(s).