date parsing fixes