         {
             RMessage.showNotification(withTitle: "Device is being flashed", subtitle: "Device is currently being flashed, please wait for the process to finish.", type: .warning, customTypeName: nil, callback: nil)
         } else if device.connected && device.isRunningTinker() {
-            self.selectedDevice = self.devices[(indexPath as NSIndexPath).row]
-            self.performSegue(withIdentifier: "tinker", sender: self)
+            self.selectedDevice = self.devices[indexPath.row]
+            self.performSegue(withIdentifier: "tinker", sender: indexPath)
         } else {
-            self.selectedDevice = self.devices[(indexPath as NSIndexPath).row]
-            self.performSegue(withIdentifier: "deviceInspector", sender: self)
+            self.selectedDevice = self.devices[indexPath.row]
+            self.performSegue(withIdentifier: "deviceInspector", sender: indexPath)
         }
     }
     

        
        if segue.identifier == "tinker" {
            if let vc = segue.destination as? SPKTinkerViewController {
                vc.device = self.selectedDevice
                
                SEGAnalytics.shared().track("Tinker: Start Tinkering", properties: ["device":deviceInfo.deviceType, "running_tinker":vc.device.isRunningTinker()])
                

        
        if segue.identifier == "deviceInspector" {
            if let vc = segue.destination as? DeviceInspectorViewController {
                let indexPath = sender as! IndexPath
                vc.device = self.devices[indexPath.row]
                
                SEGAnalytics.shared().track("Tinker: Device Inspector", properties: ["device":deviceInfo.deviceType])
                
