diff --git a/src/HttpMasterWorker.js b/src/HttpMasterWorker.js
index <HASH>..<HASH> 100644
--- a/src/HttpMasterWorker.js
+++ b/src/HttpMasterWorker.js
@@ -57,7 +57,7 @@ function loadKeysforConfigEntry(config, callback) {
     var SNImatchers = {};
     if (config.ssl.SNI) {
       for (key in config.ssl.SNI) {
-        SNImatchers[key] = new RegExp(regexpQuote(key).replace(/^\\\*\\\./g, '^([^.]+\\.)?'), 'i'); // domain names are case insensitive
+        SNImatchers[key] = new RegExp('^' + regexpQuote(key).replace(/^\\\*\\\./g, '^([^.]+\\.)?') + '$', 'i'); // domain names are case insensitive
       }
       var sniCallback = function(hostname, cb) {
         hostname = punycode.toUnicode(hostname);
@@ -318,9 +318,6 @@ function handleConfig(config, configHandled) {
     }
     self.logNotice('Start successful');
 
-    // TODO
-    //dropPrivileges();
-
     self.servers = results.filter(function(server) {
       return !!server;
     });
Fix SNI hostname matching

Where sub.domain1.com was available along with sub2.domain.com there
was a possibility to give bad SNI certificate for sub2.domain.com