diff --git a/lib/topologies/mongos.js b/lib/topologies/mongos.js
index <HASH>..<HASH> 100644
--- a/lib/topologies/mongos.js
+++ b/lib/topologies/mongos.js
@@ -807,17 +807,17 @@ Mongos.prototype.command = function(ns, cmd, options, callback) {
   // Pick a proxy
   var server = pickProxy(self);
 
-  // No server returned we had an error
-  if(server == null) {
-    return callback(new MongoError('no mongos proxy available'));
-  }
-
   // Topology is not connected, save the call in the provided store to be
   // Executed at some point when the handler deems it's reconnected
   if((server == null || !server.isConnected()) && this.s.disconnectHandler != null) {
     return this.s.disconnectHandler.add('command', ns, cmd, options, callback);
   }
 
+  // No server returned we had an error
+  if(server == null) {
+    return callback(new MongoError('no mongos proxy available'));
+  }
+
   // Execute the command
   server.command(ns, cmd, options, callback);
 }
fixed command execution issue for mongos