bug in json serialization