fixing date serialization issue