                     self.centerContainerView.superview?.removeConstraint(appliedConstraint)
                     self.rightContainerView.applyTrailingPinConstraintToSuperviewWithPadding(defualtConstant)
                     
-                    self.applyTransformAnimations(self.centerContainerView, transform: self.transformScale )
-                    self.applyAnimations()
+                    self.applyAnimations({
+                        self.applyTransformAnimations(self.centerContainerView, transform_d: self.transformScale.d )
+                    })
                     
                 }
                 else {
-                        self.closeOpenedSideMenu(self.rightContainerView, attribute: .Trailing, completion: { _ in
-                        self.applyAnimations()
+                    self.closeOpenedSideMenu(self.rightContainerView, attribute: .Trailing, completion: { _ in
+                        self.applyAnimations({
+                            self.applyTransformAnimations(self.centerContainerView, transform_d: 1.0 )
+                        })
                     })
                 }
             }

        }
        
    }

    /// Toggles the state (open or close) of the right side menu.
    public func toggleRightSideMenu()
    {

            // self.toggleRightSideMenu()
            
        default: appliedConstraint?.constant = 0
        applyAnimations({
            self.applyTransformAnimations(self.centerContainerView, transform_d: 1.0 )
        })
            
        }
        
