diff --git a/lib/url.c b/lib/url.c
index 6d4ed94aa157235d51e8135ecc37c669845e7a1b..8adcbda8dd05d42c21a4e38976f048754cd4d0bf 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -1442,7 +1442,7 @@ CURLcode Curl_disconnect(struct connectdata *conn)
 
     data->state.authproxy.done = FALSE;
     data->state.authproxy.picked =
-      data->state.authhost.want;
+      data->state.authproxy.want;
 
     data->state.authproblem = FALSE;