Fixing date serialization