             let _slider: UISlider = beaconUI?[1] as! UISlider
             
             if _switch.isOn {
-              if accuracy_min == nil || Float(_beacon.accuracy) < accuracy_min {
+              if accuracy_min == nil || Float(_beacon.accuracy) < accuracy_min! {
                 accuracy_min = Float(_beacon.accuracy)
                 nearestBeacon = beaconName
               }

        
        for i in 1..<itemsCount+1 {
          let num = NSString(format: "%02d", isLeft ? itemsCount+1 - i : i) // 左車輪の音だったら反転し、２桁で0埋め
          let url = NSBundle.mainBundle().pathForResource("tones/\(toneDir)/\(num)", ofType: "wav")!
          let audioFile = AVAudioFile(forReading: NSURL(fileURLWithPath: url), error: nil)
          audioFiles += [audioFile]
          
          let player = AVAudioPlayerNode()
          engine.attachNode(player)
          engine.connect(player, to: mixer, format: audioFile.processingFormat)
          player.volume = 9.0
          

        
        for (index, file) in _tones.enumerated() {
          var filePath: String = Bundle.main.path(forResource: "tones/\(toneDir)/\(file)", ofType: "wav")!
          var fileURL: URL = URL(fileURLWithPath: filePath)
          do {
            let audioFile = try AVAudioFile(forReading: fileURL)
            let audioFileBuffer = AVAudioPCMBuffer(pcmFormat: audioFile.processingFormat, frameCapacity: UInt32(audioFile.length))
            audioFile.readIntoBuffer(audioFileBuffer, frameCount: nil)
            let player = AVAudioPlayerNode()
            engine.attach(player)
            engine.connect(player, to: mixer, format: audioFile.processingFormat)
            player.volume = 0.0
            player.scheduleBuffer(audioFileBuffer, at: nil, options:.loops, completionHandler: nil)
            players += [player]
            
            if format == nil {
              format = audioFile.processingFormat
            }
          }
          catch {
            print("Cannot load audioFile !")
          }
        }
      }
