     @IBAction func showNotifications(sender: NSButton) {
         if showNotifCheckbox.state == NSOnState {
             showsDesktopNotifications = true
+            showNotifications.setBool(true, forKey: "ShowNotifications")
         } else if showNotifCheckbox.state == NSOffState {
             showsDesktopNotifications = false
-        }
+            showNotifications.setBool(false, forKey: "ShowNotifications")
+        }
+        showNotifications.synchronize()
     }
     
     /* LAUNCH AND TERMINATION EVENTS */
     func applicationDidFinishLaunching(aNotification: NSNotification) {
         self.preferencesWindow!.orderOut(self)
         
+        if self.showNotifications.boolForKey("ShowNotifications") {
+            showNotifCheckbox.state = NSOnState
+        } else {
+            showNotifCheckbox.state = NSOffState
+        }
+        
         if defDataDir.stringForKey("defDataDir") != nil {
             let customDataDirectory = defDataDir.stringForKey("defDataDir")!
             dataStoreTextfield.stringValue = customDataDirectory

    let defBinDir = NSUserDefaults.standardUserDefaults()
    let defDataDir = NSUserDefaults.standardUserDefaults()
    let configFileDir = NSUserDefaults.standardUserDefaults()
    var dataPath: String
    var binPath: String
    var configPath: String


            self.task.launch()
            
            if let port = getPort() {
                self.serverStatusMenuItem.title = "Running on Port \(port)"
                
                if showsDesktopNotifications {
                    showNotification("mongod-starter", text: "MongoDB server running on port \(port)", senderTitle: "Start MongoDB Server")
                }
                
            } else {
                self.serverStatusMenuItem.title = "Running on Port 27017"
                
                if showsDesktopNotifications {
                    showNotification("mongod-starter", text: "MongoDB server running on port 27017", senderTitle: "Start MongoDB Server")
                }
            }
            
            self.startServerMenuItem.hidden = true
            self.stopServerMenuItem.hidden = false
        }
