         
         self.context.queries[command.requestID] = command.promise
         
-        _ = self.channel.writeAndFlush(command)
-        
-        return promise.futureResult
+        return self.channel.writeAndFlush(command).then { promise.futureResult }
     }
     
     /// Executes the given MongoDB command, returning the result

        
        var documents: [Document] = []
        
        // minimum BSON size is 5, checksum is 4 bytes, so this works
        while buffer.readableBytes > 4 {
            let kind = try buffer.assertLittleEndian() as UInt8
            switch kind {
            case 0: // body

                
                let bsonObjectsSectionSize = Int(size) - 4 - documentSequenceIdentifier.utf8.count - 1
                guard bsonObjectsSectionSize > 0 else {
                    // TODO: Investigate why this error gets silienced
                    throw MongoKittenError(.protocolParsingError, reason: .unexpectedValue)
                }
                
                documents += try [Document](buffer: &buffer, consumeBytes: bsonObjectsSectionSize)
            default:
                // TODO: Investigate why this error gets silienced
                throw MongoKittenError(.protocolParsingError, reason: .unexpectedValue)
            }
        }
