diff --git a/common/tpl/common_layout.html b/common/tpl/common_layout.html
index 78c6a7fd5..a18cf965f 100644
--- a/common/tpl/common_layout.html
+++ b/common/tpl/common_layout.html
@@ -42,7 +42,7 @@ var request_uri = "{$request_uri}";
var xeVid = "{$vid}";
var current_mid = "{$mid}";
var waiting_message = "{$lang->msg_call_server}";
-var ssl_actions = new Array("{implode('","',$ssl_actions)}");
+var ssl_actions = new Array("{implode('","',array_keys($ssl_actions))}");
var default_url = "{Context::getDefaultUrl()}";
var http_port = {Context::get("_http_port")};
var https_port = {Context::get("_https_port")};
diff --git a/common/tpl/mobile_layout.html b/common/tpl/mobile_layout.html
index c2ab5b842..7cabe0900 100644
--- a/common/tpl/mobile_layout.html
+++ b/common/tpl/mobile_layout.html
@@ -43,7 +43,7 @@
var xeVid = "{$vid}";
var current_mid = "{$mid}";
var waiting_message = "{$lang->msg_call_server}";
- var ssl_actions = new Array("{implode('","',$ssl_actions)}");
+ var ssl_actions = new Array("{implode('","',array_keys($ssl_actions))}");
var default_url = "{Context::getDefaultUrl()}";
var http_port = {Context::get("_http_port")};
var https_port = {Context::get("_https_port")};