Why am I receiving an error saying attach referral when there is one attached?