Fix start and end date object error.