fix broken time counter