     private func _moveRightView(toPosition position: CGFloat) {
         if (self.rightViewController != nil) {
             if !self.childViewControllers.contains(self.rightViewController!) {
-                var frame: CGRect = self.rightViewController!.view.frame
+                //var frame: CGRect = self.rightViewController!.view.frame
+                var frame: CGRect = self.mainViewController!.view.frame
                 if self.isRightPresentViewOnTop {
                     frame.origin.x = view.bounds.size.width
                     frame.size.width = self.rightViewRevealWidth

        if (self.leftViewController != nil) {
            delegate?.revealController?(self, willHideLeft: self.leftViewController!)
            let duration: TimeInterval = animated ? leftToggleAnimationDuration : 0.0
            var leftFrame: CGRect = self.leftViewController!.view.frame
            if isLeftPresentViewOnTop {
                leftFrame.origin.x = -(self.leftViewRevealWidth)
            }

    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
