                     k.kernelSpec is kernelSpec
                 kernel = kernels[0]
                 if kernel
-                    @setWatchSidebar kernel.watchSidebar
+                    @setWatchSidebar kernel
                     @watchSidebar.show()
         @watchKernelPicker.toggle()
 

            console.log 'toggleWatchSidebar: showing sidebar'
            @watchSidebar.show()

    setWatchSidebar: (sidebar) ->
        console.log 'setting watch sidebar'
        if @watchSidebar isnt sidebar and @watchSidebar?.visible
            @watchSidebar.hide()

            @clearResultBubbles()
            @kernelManager.startKernelFor grammar, =>
                @setStatusBarElement()
                kernel = @kernelManager.getRunningKernelFor language
                @setWatchSidebar kernel

        else if command is 'switch-kernel'
            kernel = @kernelManager.getRunningKernelFor language
