Fix date conversion