             if cameraIsSetup {
                 if cameraDevice != oldValue {
                     _updateCameraDevice(cameraDevice)
+                    _setupMaxZoomScale()
+                    _zoom(0)
                 }
             }
         }

        do {
            let captureDevice = AVCaptureDevice.devices().first as? AVCaptureDevice
            try captureDevice?.lockForConfiguration()
            
            zoomScale = max(1.0, min(beginZoomScale * scale, maxZoomScale))
            captureDevice?.videoZoomFactor = zoomScale
            
            captureDevice?.unlockForConfiguration()
        } catch {
            print("Error locking configuration")
        }

    }
    
    private func _setupMaxZoomScale() {
        var maxZoom = CGFloat(1.0)
        beginZoomScale = CGFloat(1.0)
        
        if cameraDevice == .Back {
            maxZoom = (backCameraDevice?.activeFormat.videoMaxZoomFactor)!
        }
        else if cameraDevice == .Front {
            maxZoom = (frontCameraDevice?.activeFormat.videoMaxZoomFactor)!
        }

        maxZoomScale = maxZoom
    }

    private func _checkIfCameraIsAvailable() -> CameraState {
