fixed some serialization issues with dates