                     
                     error, keywords in
                     
-                    if let keywords = keywords.keywords where keywords.count != 0 {
-                        
-                        self.resultsView.setNumberEntities(keywords.count)
+                    if let keywords = keywords.keywords {
+                    
+                        // done here and in the else as well because AL API sometimes returns a valid, empty array, and sometimes no array at all
+                        self.resultsView.setNumberKeywords(keywords.count)
                         
                         switch keywords.count {
                             

            // start request
            let alchemyLanguage = AlchemyLanguage(apiKey: apiKey)
            let asynchronousDispatchGroup = dispatch_group_create()
            
            dispatch_group_enter(asynchronousDispatchGroup)
            alchemyLanguage.getEntities(requestType: self.requestType,

                    error, entities in
                    
                    // code
                    if let entities = entities.entities {
                        
                        self.resultsView.setNumberEntities(entities.count)
                        
