fix parsing of date fields