bugfix for dates