Fixed handling of date fields