The dates can be null.
Various bug fixes