fixed error when trying to check referral stats