Fix encoding of resources and port experimenter fields.