Fix date related problem