Fix date parsing bug