public function setBag($name, SessionBagInterface $bag)
    {
        $this->bags[strtolower($name)] = $bag;

        if ($this->isActive()) {
            $this->prepareBagsData([$name => $bag]);
        }

        return $this;
    }