             switch result {
             case let .success(innerAgencies) where innerAgencies[agencyTag] != nil:
                 
-                let currentAgency = innerAgencies[agencyTag]!
                 
                 //The agency exists & we need to load the transit agency data
                 let connectionHandler = SwiftBusConnectionHandler()

                            route.agencyTag = agencyTag
                        }
                        
                        //Saving the routes for the agency
                        currentAgency.agencyRoutes = agencyRoutes
                        

    }
    
    /**
     Gets the TransitRoutes for a particular agency. If the list of agencies hasn't been downloaded, this functions gets them first
     
     - parameter agency:       Agency object
     - parameter completion:   Code that is called after everything has loaded
     - parameter agency:   Optional TransitAgency object that contains the routes
     */
    open func configuration(forAgencyTag agencyTag: String?, completion: ((_ agency: SwiftBusResult<TransitAgency>) -> Void)?) {
        
        guard let agencyTag = agencyTag else {
