      */ 
     private function stage_orientationChangeHandler(event:StageOrientationEvent):void
     {
-        setCurrentState(getCurrentViewState(), false);    
+        if (isActive)
+        	setCurrentState(getCurrentViewState(), false);
     }
     
     

    }
    
    /**
     *  Returns the state the view should be in based on the orientation
     *  of the device.
     * 
     *  @return A String specifying the name of the state to apply to the screen. 
     *  
     *  @langversion 3.0
     *  @playerversion Flash 10.1

    /**
     *  @private
     */ 
    mx_internal function backKeyHandledByView():Boolean
    {
        if (hasEventListener(FlexEvent.BACK_KEY_PRESSED))
        {
            var event:FlexEvent = new FlexEvent(FlexEvent.BACK_KEY_PRESSED, false, true);
            var eventCanceled:Boolean = !dispatchEvent(event);
            
            // If the event was canceled, that means the application
            // is doing its own custom logic for the back key
            return eventCanceled;
        }
        
        return false;
    }
    
    /**
     *  @private
     */ 
    mx_internal function menuKeyHandledByView():Boolean
    {
        if (hasEventListener(FlexEvent.MENU_KEY_PRESSED))
        {
            var event:FlexEvent = new FlexEvent(FlexEvent.MENU_KEY_PRESSED, false, true);
            var eventCanceled:Boolean = !dispatchEvent(event);
            
            // If the event was canceled, that means the application
