fix deletion of members upon adding new ones and necessary links