             // replace configuration on the database with the new configuration
             self.realm.beginWrite()
             do {
-                self.realm.delete(self.config)
+                if self.config != nil {
+                    self.realm.delete(self.config)
+                }
+                
                 self.realm.add(fetchedConfig)
                 
                 try self.realm.commitWrite()

    
    private let manager = Alamofire.Manager(configuration: NSURLSessionConfiguration.ephemeralSessionConfiguration())
    
    private func fetchOrUpdateAppleServiceURLs() {
        manager.request(.GET, Constants.internalServiceURL).response { _, _, data, error in
            guard let jsonData = data else {
                print("No data returned from internal server!")

    /// 3. Parse the results and update the local database
    /// 4. Fetch and index transcripts from ASCIIWWDC
    func refresh() {
        downloadAppConfigAndSyncDatabase()
    }
    
    /// Returns the list of sessions available sorted by year and session id
