Bug fixes for dates.