Fix dependency cycle in class slave.