Fix issue when date is not defined