fix json serialization