     }
     
     public func changeRightViewController(rightViewController: UIViewController, closeRight:Bool) {
-        removeViewController(rightViewController)
+        removeViewController(self.rightViewController)
         self.rightViewController = rightViewController;
         setUpViewController(rightContainerView, targetViewController: rightViewController)
         if closeRight {

    
    public func changeMainViewController(mainViewController: UIViewController,  close: Bool) {
        
        removeViewController(mainViewController)
        self.mainViewController = mainViewController
        setUpViewController(mainContainerView, targetViewController: mainViewController)
        if (close) {

    
    public func changeLeftViewController(leftViewController: UIViewController, closeLeft:Bool) {
        
        removeViewController(self.leftViewController)
        self.leftViewController = leftViewController
        setUpViewController(leftContainerView, targetViewController: leftViewController)
        if closeLeft {
