         if (haveState)
         {
             pendingQueryString = queryString;
-            ApplicationGlobals.application.callLater(this.submitQuery);
+            FlexGlobals.topLevelApplication.callLater(this.submitQuery);
         }
     }
     

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

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

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