fix persistence bug with dates