      */ 
     public function save():void
     {
-        if (!("historyManagementEnabled" in ApplicationGlobals.application) ||
-            !ApplicationGlobals.application.historyManagementEnabled)
+        if (!("historyManagementEnabled" in FlexGlobals.topLevelApplication) ||
+            !FlexGlobals.topLevelApplication.historyManagementEnabled)
             return;
 
         var haveState:Boolean = false;

     */ 
    public function register(obj:IHistoryManagerClient):void
    {
        if (!("historyManagementEnabled" in ApplicationGlobals.application) ||
            !ApplicationGlobals.application.historyManagementEnabled)
            return;

        // Ensure that this object isn't already registered.

        if (appID)
            return;

        if (!("historyManagementEnabled" in FlexGlobals.topLevelApplication) ||
            !FlexGlobals.topLevelApplication.historyManagementEnabled)
            return;

        var loaderInfo:LoaderInfo;
