     view.dispose()
 
     # Remove the subview from the lists.
-    index = _(@subviews).indexOf(view)
-    @subviews.splice index, 1 if index > -1
-    delete @subviewsByName[name]
+    index = _.indexOf subviews, view
+    subviews.splice index, 1 if index > -1
+    delete byName[name]
 
   # Rendering
   # ---------

        # Return the view.
        this

    # Initialize subviews collections.
    @subviews = []
    @subviewsByName = {}

    # Call Backbone’s constructor.
    super


  dispose: ->
    return if @disposed

    # Unregister all regions.
    @unregisterAllRegions()

    # Dispose subviews.
    subview.dispose() for subview in @subviews if @subviews?

    # Unbind handlers of global events.
    @unsubscribeAllEvents()
