diff --git a/R/whatNWISsites.R b/R/whatNWISsites.R
index 1b392f2e19c0f4f884022ce8a3b8f13d4dc6460e..fbc26a325c5f8555dbfbfed0a1f8e990d0803f33 100644
--- a/R/whatNWISsites.R
+++ b/R/whatNWISsites.R
@@ -24,7 +24,7 @@ whatNWISsites <- function(...){
   urlCall <- paste(baseURL,
                    urlCall,sep = "")
   
-  if(url.exists(urlSitefile)){
+  if(url.exists(urlCall)){
     h <- basicHeaderGatherer()
     doc = tryCatch({
       returnedDoc <- getURI(urlCall, headerfunction = h$update)