      */
     public function popAll(transition:IViewTransition = null):void
     {
-        if (currentSection.length == 0 || !canRemoveCurrentView())
+        if (!currentSection || currentSection.length == 0 || !canRemoveCurrentView())
             return;
              
         lastAction = POP_ACTION;

            
            view.setCurrentState(view.getCurrentViewState(landscapeOrientation), false);
            addElement(view);
        }
        
        // Put this before viewAdded() so another validation pass won't cause this to happen
        currentViewChanged = false; 
        viewAdded(transitionsEnabled ? pendingViewTransition : null);
        pendingViewTransition = null;
    }
    

     */
    public function get activeView():View
    {
        if (currentViewData && currentViewData != emptyViewData)
            return currentViewData.instance;
        
        return null;
