fix some json serialization