 		}
 	}
 
+	private let queue: NSOperationQueue = {
+		let q = NSOperationQueue()
+		q.underlyingQueue = dispatch_queue_create(nil, DISPATCH_QUEUE_SERIAL)
+		return q
+	}()
+	private var deiniting = false
+
 	func gotoPage(page: Int, animated: Bool) {
 		assert(scrollView.superview! == view)
-		dispatch_async(dispatch_get_main_queue()) {
-			self.setContentSize(self.pageCount)
-			self.currentPage = page
-			self.scrollView.scrollRectToVisible(self.frameForPage(page), animated: animated)
-			self.attachIncomingViews()
-			self.delegateViewControllerPresentationMessages()
+		queue.addOperationWithBlock { [weak self] in
+			guard let me = self else {
+				return
+			}
+			if me.deiniting {
+				return
+			}
+			dispatch_async(dispatch_get_main_queue(), {
+				me.setContentSize(me.pageCount)
+				me.currentPage = page
+				me.scrollView.scrollRectToVisible(me.frameForPage(page), animated: animated)
+				me.attachIncomingViews()
+				me.delegateViewControllerPresentationMessages()
+			})
 		}
 	}
 

	}

	private func setContentSize(pageCount: Int) {
		scrollView.frame = CGRect(origin: .zero, size: view.frame.size)
		let frame = HorizontalAgnosticRect(view.frame)
		frame.size.relevant = frame.size.relevant * CGFloat(pageCount)
		scrollView.contentSize = frame.rect.size


	deinit {
		scrollView.removeObserver(self, forKeyPath: "bounds")
		self.deiniting = true
		self.queue.cancelAllOperations()
	}
}

