fixed date object creation errors