Fix referrer and remove debug