     func applicationDidBecomeActive(aNotification: NSNotification) {
         backgroundTimer?.invalidate()
         backgroundTimer = nil
+
+        backgroundTimer2?.invalidate()
+        backgroundTimer2 = nil
 
         NSApplication.sharedApplication().dockTile.badgeLabel = ""
         if (self.activatedFromBackground) {
             if (self.reactivationMenuItem.state == 1) {
                 webView.evaluateJavaScript("reactivation()", completionHandler: nil)
             }
-
         } else {
             self.activatedFromBackground = true;
         }

		// Load URL
        let url : String = "https://messenger.com/login"
        let req = NSMutableURLRequest(URL: NSURL(string: url)!)
        webView.loadRequest(req);
    }

    func applicationDidResignActive(notification: NSNotification) {
        backgroundTimer = NSTimer.scheduledTimerWithTimeInterval(3600, target: self, selector: "backgroundRefresh", userInfo: nil, repeats: true)
    }

    func backgroundRefresh() {

        websiteDataStore.fetchDataRecordsOfTypes(dataTypes, completionHandler: { records in
        self.websiteDataStore.removeDataOfTypes(dataTypes, forDataRecords: records, completionHandler: {
                self.webView.reload()
                self.lastBackgroundRefreshTime = CFAbsoluteTimeGetCurrent()
            })
        })
    }
