fix bug with date parsing.