Fix possible date error.