Set masters and slaves globaly