             }
         }
         
-        return newDocuments
+        return newIds
     }
     
     // Read

    ///
    /// - throws: When we can't send the request/receive the response, you don't have sufficient permissions or an error occurred
    ///
    /// - returns: The inserted document
    @discardableResult
    public func insert(_ document: Document) throws -> Document {
        let result = try self.insert([document])
        
        guard let newDocument: Document = result.first else {
            throw MongoError.insertFailure(documents: [document], error: nil)
        }
        
        return newDocument
    }
    
    /// TODO: Detect how many bytes are being sent. Max is 48000000 bytes or 48MB

    ///
    /// - throws: When we can't send the request/receive the response, you don't have sufficient permissions or an error occurred
    ///
    /// - returns: The documents' ids
    @discardableResult
    public func insert(_ documents: [Document], stoppingOnError ordered: Bool? = nil, timeout customTimeout: TimeInterval? = nil) throws -> [Value] {
        let timeout: TimeInterval = customTimeout ?? (60 + (Double(documents.count) / 50))
        
        var documents = documents
        var newIds = [Value]()
        let protocolVersion = database.server.serverData?.maxWireVersion ?? 0
        
        while !documents.isEmpty {
