         let doc = try reply.getDocument()
 
         if let conversationId = doc["conversationId"] as? Int {
+            self.conversationId = Int32(conversationId)
+        } else if let conversationId = doc["conversationId"] as? Int32 {
             self.conversationId = conversationId
-        } else if let conversationId = doc["conversationId"] as? Int32 {
-            self.conversationId = Int(conversationId)
         } else {
             throw try MongoGenericErrorReply(reply: reply)
         }

/// The payload must contian an answer to the SASLReply's challenge
struct SASLContinue: Codable {
    private var saslContinue: Int32 = 1
    let conversationId: Int
    let payload: BinaryOrString

    init(conversation: Int, payload: String) {
        self.conversationId = conversation
        self.payload = .string(payload)
    }

///
/// If no authentication is needed, SASLStart's reply may contain `done: true` meaning the SASL proceedure has ended
struct SASLReply: Decodable {
    let conversationId: Int32
    let done: Bool
    let payload: BinaryOrString

