     private func _moveLeftView(toPosition position: CGFloat) {
         if (self.leftViewController != nil) {
             if !self.childViewControllers.contains(self.leftViewController!) {
-                var frame: CGRect = self.leftViewController!.view.frame
+                //var frame: CGRect = self.leftViewController!.view.frame
+                var frame: CGRect = self.mainViewController!.view.frame
                 if self.isLeftPresentViewOnTop {
                     frame.origin.x = -(self.leftViewRevealWidth)
                     frame.size.width = self.leftViewRevealWidth

            }
            return
        }
        toViewController.view.frame = fromViewController.view.frame
        delegate?.revealController?(self, willAdd: toViewController, for: operation, animated: animated)
        
        let completion: (() -> Void) = {() -> Void in

    private func _swapFromViewController(_ fromViewController: UIViewController, toViewController: UIViewController, operation: PBRevealControllerOperation, animated: Bool) {
        let duration: TimeInterval = animated ? replaceViewAnimationDuration : 0.0
        if fromViewController != toViewController {
            //toViewController.view.frame = fromViewController.view.frame
            var frame: CGRect = self.mainViewController!.view.frame
            frame.origin.x = fromViewController.view.frame.origin.x
            toViewController.view.frame = frame
            delegate?.revealController?(self, willAdd: toViewController, for: operation, animated: animated)
            switch operation {
            case .replaceLeftController, .replaceRightController:
