Fix bug with referral notifications not being sent. Closes #194