     }
     
     public func reloadData() {
-        countOfCards = Int(dataSource!.koloda(kolodaNumberOfCards: self))
+        guard let numberOfCards = dataSource?.koloda(kolodaNumberOfCards: self) where numberOfCards > 0 else {
+            return
+        }
+        let countOfCards = Int(numberOfCards)
+        
         let missingCards = min(countOfVisibleCards - visibleCards.count, countOfCards - (currentCardNumber + 1))
         
-        if countOfCards == 0 {
-            return
-        }
         
         if currentCardNumber == 0 {
             clear()

    }
    
    private func overlayViewForCardAtIndex(index: UInt) -> OverlayView? {
        return dataSource.koloda(self, viewForCardOverlayAtIndex: index)
    }
    
    //MARK: Actions

    }
    
    private func setupDeck() {
        if let dataSource = dataSource {
            countOfCards = Int(dataSource.koloda(kolodaNumberOfCards: self))
            
            if countOfCards - currentCardNumber > 0 {
                
                let countOfNeededCards = min(countOfVisibleCards, countOfCards - currentCardNumber)
                
                for index in 0..<countOfNeededCards {
                    let nextCardContentView = dataSource.koloda(self, viewForCardAtIndex: UInt(index+currentCardNumber))
                    let nextCardView = DraggableCardView(frame: frameForCardAtIndex(UInt(index)))
                    
                    nextCardView.delegate = self
