fix cloudcare 500 resulting from mistakenly looking up referral details