diff --git a/libraries/AP_GPS/AP_GPS.cpp b/libraries/AP_GPS/AP_GPS.cpp
index 28130fffa2d3b12d492b1c6fe8e3b5e8c87a019e..414986f0aaed416bb530c43547e3a5b7e71076d2 100644
--- a/libraries/AP_GPS/AP_GPS.cpp
+++ b/libraries/AP_GPS/AP_GPS.cpp
@@ -72,8 +72,8 @@ void AP_GPS::init(DataFlash_Class *dataflash)
 {
     _DataFlash = dataflash;
     hal.uartB->begin(38400UL, 256, 16);
-#if GPS_MAX_INSTANCES > 1
     primary_instance = 0;
+#if GPS_MAX_INSTANCES > 1
     if (hal.uartE != NULL) {
         hal.uartE->begin(38400UL, 256, 16);        
     }
@@ -363,7 +363,6 @@ AP_GPS::update(void)
         }
     }
 #else
-	primary_instance=0;
     num_instances = 1;
 #endif // GPS_MAX_INSTANCES
 	// update notify with gps status. We always base this on the primary_instance