Fixed referral code generation