fixed error when date is missing