public function uninstall()
    {
        $handler = $this->stack->pop();

        if ($handler !== $this) {
            if (null !== $handler) {
                $this->stack->push($handler);
            }

            throw new NotInstalledException();
        }
    }