     func syncIfNeededAndPossible() {
         let appDelegate = UIApplication.sharedApplication().delegate as! AppDelegate
         if appDelegate.reachability.isReachableViaWiFi() {
+            actorsIndex.syncIfNeeded()
             moviesIndex.syncIfNeeded()
         }
     }

    static let sharedInstance = AlgoliaManager()

    let client: OfflineClient
    var actorsIndex: Index
    var moviesIndex: MirroredIndex
    
    var shouldLoadImages = true

        actorsIndex = client.getIndex("actors")
        moviesIndex = client.getIndex("movies")
        
        // Sync the indices for offline use.
        let delayBetweenSyncs: NSTimeInterval = 30 * 60 // 30 minutes
        moviesIndex.mirrored = true
        moviesIndex.dataSelectionQueries = [
            DataSelectionQuery(query: Query(parameters: ["filters": "year >= 2000"]), maxObjects: 500),
            DataSelectionQuery(query: Query(parameters: ["filters": "year < 2000"]), maxObjects: 100)
        ]
        moviesIndex.delayBetweenSyncs = delayBetweenSyncs

        actorsIndex.mirrored = true
        actorsIndex.dataSelectionQueries = [
            DataSelectionQuery(query: Query(), maxObjects: 500) // should mirror the entire index
        ]
        actorsIndex.delayBetweenSyncs = delayBetweenSyncs
        
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(syncDidStart), name: MirroredIndex.SyncDidStartNotification, object: moviesIndex)
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(syncDidFinish), name: MirroredIndex.SyncDidFinishNotification, object: moviesIndex)
