fixed affiliate_id issue