     }
     
     public func overlayMasterViewController() {
-        guard masterPresentationStyle == .Hidden, let detailContainer = detailContainer else {
+        guard masterPresentationStyle == .Hidden else {
             return
         }
         
         let button = UIButton(type: .Custom)
         button.translatesAutoresizingMaskIntoConstraints = true
-        button.frame = detailContainer.bounds
+        button.frame = detailViewController?.view.frame ?? CGRectZero
         button.addTarget(self, action: Selector("overlayHideButtonTapped"), forControlEvents: .TouchUpInside)
-        detailContainer.addSubview(button)
+        view.addSubview(button)
 
         overlayHideButton = button
         masterPresentationStyle = .Overlay

            removeChild(masterViewController)
        }
        didSet {
            addChild(masterViewController, containerView: masterContainer)
        }
    }
    

    private func updateFrames() {
        let frames = containerFrames
        if masterPresentationStyle != .Hidden {
            masterViewController?.view.frame = frames.master
        }
        if detailPresentationStyle != .Hidden {
            detailViewController?.view.frame = frames.detail
        }
    }
    
