         let containerView = transitionContext.containerView()!
         let bounds = UIScreen.mainScreen().bounds
         
-        toViewController.view.frame = CGRectOffset(bounds, bounds.size.width - (self.MainController.snapshotViewForDismissedController.superview != nil ? self.MainController.peekGapForDismissedController : 0), 0)
+        toViewController.view.frame = CGRectOffset(bounds, bounds.size.width - (self.MainController.dismissedControllerView != nil ? -self.MainController.constraintForPeekView.constant : 0), 0)
         
         containerView.addSubview(toViewController.view)
         

    let presentInteraction = SidebarPresentInteraction()
    let dismissInteraction = SidebarDismissInteraction()
    
    var snapshotViewForDismissedController:UIView = UIView()
    var peekGapForDismissedController:CGFloat = 40
    var presentAnimationDuration:NSTimeInterval = 0.5
    var dismissAnimationDuration:NSTimeInterval = 0.5
    

        let containerView = transitionContext.containerView()!
        let bounds = UIScreen.mainScreen().bounds
        
        self.MainController.dismissedControllerView?.removeFromSuperview()
        self.MainController.dismissedControllerView = fromViewController.view.snapshotViewAfterScreenUpdates(true)
        
        fromViewController.view.frame = bounds
        toViewController.view.frame = bounds
