Added tests for date deserialization and fixed it.