 
                     let error = NSError(domain: HeimdallrErrorDomain, code: HeimdallrErrorNotAuthorized, userInfo: userInfo)
                     completion(.Failure(error))
-                    releaseRequestQueue()
                 }
             } else {
+                defer {
+                    self.releaseRequestQueue()
+                }
                 let request = authenticateRequest(request, accessToken: accessToken)
                 completion(.Success(request))
-                releaseRequestQueue()
             }
         } else {
+            defer {
+                self.releaseRequestQueue()
+            }
             let userInfo = [
                 NSLocalizedDescriptionKey: NSLocalizedString("Could not add authorization to request", comment: ""),
                 NSLocalizedFailureReasonErrorKey: NSLocalizedString("Not authorized.", comment: "")

                        }))
                    }
                } else {
                    let userInfo = [
                        NSLocalizedDescriptionKey: NSLocalizedString("Could not add authorization to request", comment: ""),
                        NSLocalizedFailureReasonErrorKey: NSLocalizedString("Access token expired, no refresh token available.", comment: "")


            let error = NSError(domain: HeimdallrErrorDomain, code: HeimdallrErrorNotAuthorized, userInfo: userInfo)
            completion(.Failure(error))
        }
    }

