fixed incorrect key value order for affiliates. also forgot nested sub array