Fixed referral bug