Fix issues when secondaries changed