     }
     
     func stopTimers() {
-        if (portOpenTimer!.valid) {
+        if (portOpenTimer != nil && portOpenTimer!.valid) {
             portOpenTimer!.invalidate()
         }
         

    
        notificationCenter.addObserver(self, selector: "taskStopped:", name: NSTaskDidTerminateNotification, object: task)
        notificationCenter.addObserver(self, selector: "receivedOut:", name: NSFileHandleDataAvailableNotification, object: nil)
    }
    
    func run() -> (String?) {

    }
    
    func ensureRunning() -> (String?) {
        if !registerVersion() {
            return "Could not determine syncthing version"
        }
        let result = portFinder.findPort()
        // mop: ITS GO :O ZOMG!!111
        if (result.err != nil) {
