   if (!adk.isReady())
   {
     // If not connected to USB, we are 'DISCONNECTED'.
-    system_state = DISCONNECTED;
+    if (system_state != DISCONNECTED)
+    {
+      Serial.println("STATE: DISCONNECTED");
+      system_state = DISCONNECTED;
+    }
     
     // Wait for USB connection again.
     yield();

      motor[1]->velocity(), motor[1]->current()
    );
    send(output_buffer);
    
    // TODO: Remove this hack
    // Send encoder status update over USB
    long pos = ((platypus::Winch*)sensor[2])->position();

    // If connected to USB, we are now 'CONNECTED'!
    if (system_state == DISCONNECTED)
    {
      Serial.println("STATE: CONNECTED");
      system_state = CONNECTED; 
    }
  }
        
  // Attempt to read command from USB.
  adk.read(&bytes_read, INPUT_BUFFER_SIZE, (uint8_t*)input_buffer);
  unsigned long current_command_time = millis();
  if (bytes_read <= 0) 
  {
    // If we haven't received a response in a long time, maybe 
    // we are 'CONNECTED' but the server is not running.
    if (current_command_time - last_command_time >= RESPONSE_TIMEOUT_MS)
    {
      if (system_state == RUNNING)
      {
        Serial.println("STATE: CONNECTED");
        system_state = CONNECTED; 
      }
    }
    
    // Wait for more USB data again.
