Fix date related issue