diff --git a/lib/context.c b/lib/context.c
index f3b56ce057bba0c03cc2fa0895bae2dc731a7094..9b89564ad75839d025a478b4ecc76e0eb65ca811 100644
--- a/lib/context.c
+++ b/lib/context.c
@@ -490,7 +490,7 @@ lws_create_vhost(struct lws_context *context,
 	 * for a protocol get it enabled.
 	 */
 
-	if (info->options & LWS_SERVER_OPTION_EXPLICIT_VHOSTS)
+	if (context->options & LWS_SERVER_OPTION_EXPLICIT_VHOSTS)
 		f = 0;
 	(void)f;
 #ifdef LWS_WITH_PLUGINS
@@ -520,7 +520,7 @@ lws_create_vhost(struct lws_context *context,
 #ifdef LWS_WITH_PLUGINS
 	    (context->plugin_list) ||
 #endif
-	    info->options & LWS_SERVER_OPTION_EXPLICIT_VHOSTS)
+	    context->options & LWS_SERVER_OPTION_EXPLICIT_VHOSTS)
 		vh->protocols = lwsp;
 	else {
 		vh->protocols = info->protocols;