         {
             BrowserManager.getInstance().setFragment(pendingQueryString);
             pendingQueryString = null;
-            if ("resetHistory" in ApplicationGlobals.application)
-                ApplicationGlobals.application.resetHistory = true;
+            if ("resetHistory" in FlexGlobals.topLevelApplication)
+                FlexGlobals.topLevelApplication.resetHistory = true;
         }
     }
     

        var p:String;
        var crc:String;
            
        if (!("historyManagementEnabled" in ApplicationGlobals.application) ||
            !ApplicationGlobals.application.historyManagementEnabled)
            return;

        var pieces:Array = event.url.split(PROPERTY_SEPARATOR);

        if (appID)
            return;

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

        var loaderInfo:LoaderInfo;
