 		observingVolumeChanges = true
 		
 		// Add the hidden `MPVolumeView`.
-		UIApplication.shared.windows.first?.addSubview(volumeView)
+		volumeWindow.addSubview(volumeView)
 		
 		// Initialize the audio session
 		do {

		
		// Update the window height and configure the window
		updateHeight()
		volumeWindow.isHidden = true
		volumeWindow.backgroundColor = nil
		volumeWindow.rootViewController = volumeViewController
		volumeWindow.windowLevel = UIWindowLevelStatusBar + 1
		
		// A non-hidden MPVolumeView is needed to prevent the system volume HUD from showing.
		volumeView.clipsToBounds = true
		volumeView.showsRouteButton = false
		volumeView.isUserInteractionEnabled = false
	}
	
	deinit {

		var hideDuration = minimumVisibleDuration
		
		// Only show the `volumeWindow` if not already showing
		if isHidden {
			// Show the window
			isHidden = false
		
			// Call the delegate method
			delegate?.volumeBarWillShow(self)
			
