public void stop() {
      command.stop();

      if (thread != null) {
        thread.interrupt();
      }
    }