                 pagesForCurrentPage(page)
             }
         }
+        
+        if (completion != nil) { completion!() }
     }
     
     func pagesForCurrentPage(page: FolioReaderPage?) {

    func changePageWith(page page: Int, animated: Bool = false, completion: (() -> Void)? = nil) {
        if page > 0 && page-1 < totalPages {
            let indexPath = NSIndexPath(forRow: page-1, inSection: 0)
            changePageWith(indexPath: indexPath, animated: animated)
            
            // Delay to wait animation complete
            let delayTime = dispatch_time(DISPATCH_TIME_NOW, Int64(0.2 * Double(NSEC_PER_SEC)))
            dispatch_after(delayTime, dispatch_get_main_queue()) {
                self.updateCurrentPage()
                if (completion != nil) { completion!() }
            }
        }
    }
    

        if currentPageNumber == page {
            if fragment != "" && currentPage != nil {
                currentPage.handleAnchor(fragment, avoidBeginningAnchors: true, animating: animated)
                if (completion != nil) { completion!() }
            }
        } else {
            tempFragment = fragment
            changePageWith(page: page)
            
            changePageWith(page: page, animated: false, completion: { () -> Void in
                self.updateCurrentPage({ () -> Void in
                    if (completion != nil) { completion!() }
                })
            })
        }
    }
    
