Further fixing of json serialization.