         }
 
         // Parse all queries
-        var queries = [Substring: Substring]()
+        var queries = [String: String]()
         queries.reserveCapacity(10)
         
         if let queryString = queryString {
             queryString.split(separator: "&").forEach { queryItem in
                 // queryItem can be either like `someOption` or like `someOption=abc`
                 let queryItemParts = queryItem.split(separator: "=", maxSplits: 1)
-                let queryItemName = queryItemParts[0]
-                let queryItemValue = queryItemParts.count > 1 ? queryItemParts[1] : ""
+                let queryItemName = String(queryItemParts[0])
+                let queryItemValue = queryItemParts.count > 1 ? String(queryItemParts[1]) : ""
 
                 queries[queryItemName] = queryItemValue
             }
         }
+        
+        self.queryParameters = queries
         
         // Parse the authentication details, if included
         if uriContainsAuthenticationDetails {

import Foundation

fileprivate extension Bool {
    init?(queryValue: Substring?) {
        switch queryValue {
        case nil:
            return nil


    /// Indicates that there is one host for which we'll need to do an query
    public let isSRV: Bool
    
    public var queryParameters: [String: String]

    /// Initializes a new connection settings instacen.
    ///
