bugfix on date fields