working automatic clear_referrers