Fix bug in views when document date is missing