                 
                 let backDevice = getDevice(.Front)
                 self.captureDevice = backDevice
-                beginSession()
+                currentPosition = .Back
+                configureSession()
                 sender.setTitle("back", forState: .Normal)
             }catch{
                 print("Cant remove input: \(error)")

                captureSession.removeInput(try AVCaptureDeviceInput(device: backDevice))
                let frontDevice = getDevice(.Front)
                self.captureDevice = frontDevice
                beginSession()
                sender.setTitle("Front", forState: .Normal)
            }catch{
                print("Cant remove/Add input: \(error)")

            captureSession.sessionPreset = AVCaptureSessionPresetPhoto
        }
        self.recordingModePhoto = !self.recordingModePhoto
        captureSession.startRunning()
    }
    
    @IBAction func changeCamera(sender: UIButton) {
