                 } else {
                     clearCurrentBottomView()
                 }
-            } else if currentIndex == prevNumberOfItems - 1 {
+            } else if Int(currentIndex) == Int(prevNumberOfItems) - 1 {
                 setItemViewForCurrentBottomView(actualDataSource.swipeRevealGalleryView(self, viewForItemAtIndex: currentIndex+1))
             }
             

                            innerSelf.currentTopView.userInteractionEnabled = true
                            innerSelf.currentIndex += 1
                            
                            if innerSelf.currentIndex < innerSelf.numberOfItems - 1 && innerSelf.dataSource != nil {
                                innerSelf.setItemViewForCurrentBottomView(innerSelf.dataSource!.swipeRevealGalleryView(innerSelf, viewForItemAtIndex: innerSelf.currentIndex+1))
                            } else {
                                innerSelf.clearCurrentBottomView()

    func decreaseItemsCount(by: UInt){
        guard by > 0 else { return }

        numberOfItems = by > numberOfItems ? 0 : numberOfItems - by
        
        if numberOfItems < currentIndex + 2 {
            clearCurrentBottomView()
