                         self.currentPageIndex = index
                     }
                     completion?(viewController, animated, finished)
+                    self.isTransitioning = false
             })
             
         } else {

    // MARK: Transitioning
    //
    
    public func transitionToPage(atIndex index: Int,
                                 animated: Bool,
                                 completion: PageTransitionCompletion? = nil) {
        if index != self.currentPageIndex {
            guard index >= 0 && index < self.viewControllers?.count ?? 0 else { return }
            guard let viewController = self.viewControllers?[index] else { return }
            
            let direction = NavigationDirection.forPage(index, previousPage: self.currentPageIndex)
            self.pageViewController.setViewControllers([viewController],
                                                       direction: direction.pageViewControllerNavDirection,
                                                       animated: animated,

    // MARK: Page management
    //
    
    
    /// Reload the view controllers in the page view controller. 
    /// This reloads the dataSource entirely, calling viewControllers(forPageboyViewController:)
    /// and defaultPageIndex(forPageboyViewController:).
    public func reloadPages() {
        self.reloadPages(reloadViewControllers: true)
    }
