         if (self.rightViewController != nil) {
             delegate?.revealController?(self, willHideRight: self.rightViewController!)
             let duration: TimeInterval = animated ? rightToggleAnimationDuration : 0.0
-            var rightFrame: CGRect = self.rightViewController!.view.frame
+            //var rightFrame: CGRect = self.rightViewController!.view.frame
+            var rightFrame: CGRect = self.mainViewController!.view.frame
             if self.isRightPresentViewOnTop {
                 rightFrame.origin.x = view.bounds.size.width
             }

                return
            }
            delegate?.revealController?(self, willShowRight: self.rightViewController!)
            var rightFrame: CGRect = self.rightViewController!.view.frame
            if self.isRightPresentViewOnTop {
                rightFrame.origin.x = view.bounds.size.width
            }

    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.mainViewController!.view.frame
                if self.isLeftPresentViewOnTop {
                    frame.origin.x = -(self.leftViewRevealWidth)
                    frame.size.width = self.leftViewRevealWidth
