     
     func updateLights()
     {
-        self.lights = self.lifxNetworkContext.allLightsCollection.lights as? LFXLight[]
-        if self.lights?.count > 0
+        if let lights = self.lifxNetworkContext.allLightsCollection.lights as? LFXLight[]
         {
-            let light: LFXLight = self.lights![0]
-            
+            self.lights = lights
+        }
+        
+        if self.lights.count > 0
+        {
+            let light: LFXLight = self.lights[0]
+
             let color = self.colorForCurrentSchedule(self.schedule)
             light.setColor(color)
         }

    var schedule: Schedule?
    
    let lifxNetworkContext: LFXNetworkContext
    var lights: LFXLight[]?
    
    let managedObjectContext: NSManagedObjectContext = {
        let moc = NSManagedObjectContext(concurrencyType: .MainQueueConcurrencyType)

        
        self.stopsViewModel = stopsViewModel
        self.schedulesRepository = schedulesRepository
        self.lights = []

        super.init(coder: coder)
        
        self.nearbyStopsViewControllerModel.delegate = self
