If history time counter is somehow null in the database, set it to 0.