private function updateMainNodePostCloning(AbstractClassContent $content, array $cloningPages, BBUserToken $token = null)
    {
        $mainnode = $content->getMainNode();

        if (
                null !== $mainnode &&
                0 < count($cloningPages) &&
                true === in_array($mainnode->getUid(), array_keys($cloningPages))
            ) {
            // Loading draft for content
            if (
                    null !== $token &&
                    (null !== $draft = $this->_em->getRepository('BackBee\ClassContent\Revision')->getDraft($content, $token, true))
                ) {
                $content->setDraft($draft);
            }
            $content->setMainNode($cloningPages[$mainnode->getUid()]);
        }

        return $this;
    }