Fix date overflow