Fixed json serialization.