                     scroll_to(gui.primary_panel.dom)
                     set_panel_initial_focus gui.primary_panel.dom
             when '\r'
-                gui.primary_panel.dom.find('.panel-collapse').collapse('toggle')
+                $(gui.primary_panel.dom).find('.panel-collapse').collapse('toggle')
                 scroll_to(gui.primary_panel.dom)
                 #TODO For some reason I think I might be doing the line below twice
                 wait_if_else .1,

            when 'i'
                if $('#remove-bucket-modal').attr('aria-hidden') == "false"
                    gui.focus($('#delete-modal-delete-button'))
                else if gui.primary_panel.dom.find('.panel-collapse').hasClass('in')
                    gui.focus($('#delete-modal-delete-button'))
            when 't'
                #alt-t is tools in firefox, I'm choosing to override it for now...
                #TODO is this a jerk move?

                else
                    if gui.primary_panel.dom.prev().length != 0
                        gui.primary_panel.change(gui.primary_panel.dom.prev())
                    if $(gui.primary_panel.dom).find('.panel_collapse').hasClass('in')
                        set_panel_initial_focus gui.primary_panel.dom
            when 'j'
                if current_dropdown_item
