Correct variable for affiliate's ID passed to get_affiliate_name() to fix the missing name. Closes #376