fixed the json serialization bug