bug fixes to date handling (what else?)