Fix code around subscribe/unsubscribe/affiliation changes