diff --git a/templates/index.html.ep b/templates/index.html.ep
index 461d5b4..3711753 100644
--- a/templates/index.html.ep
+++ b/templates/index.html.ep
@@ -107,12 +107,21 @@
          return ["hsl(",hue,",90%,70%)"].join("");
        }
 
-       function bitmask2window(n) {
-         var str = n.toString(2).padStart(10, "0")
-                    .replace(/^([0-9]{5})/, '$1 ')
-                    .replace(/0/g, '·')
-                    .replace(/1/g, '+');
-         return str;
+       function bitmask2window(autofocus, win) {
+         var af_str = autofocus.toString(2).padStart(10, "0")
+                               .replace(/^([0-9]{5})/, '$1 ')
+                               .replace(/0/g, '·')
+                               .replace(/1/g, '◼');
+         var w_str = win.toString(2).padStart(10, "0")
+                        .replace(/^([0-9]{5})/, '$1 ')
+                        .replace(/0/g, '·')
+                        .replace(/1/g, 'o');
+         for (var i=0, l=af_str.length; i<l; i++) {
+           if(af_str.charAt(i) == '·' && w_str.charAt(i) == 'o' ) {
+             af_str = af_str.substring(0, i) + "◽" + af_str.substring(i+1);
+           }
+         }
+         return af_str;
        }
 
        function bitvec2window(n, heat, word) {
@@ -310,7 +319,7 @@
              { "data": "dice", render: function ( data, type, row ) {return data.toExponential(2) }},
              { "data": "ld", render: function ( data, type, row ) {return data.toFixed(2) }},
              { "data": "af", render: function ( data, type, row ) {return data.toFixed(2) }},
-             { "data": "win", width: "auto", sClass: "dt-center mono compact", render: function ( data, type, row ) {return bitmask2window(data) }},
+             { "data": "afwin", width: "auto", sClass: "dt-center mono compact", render: function ( data, type, row ) {return bitmask2window(data, row.win) }},
              { "data": "llfmd", render: function ( data, type, row ) {return data.toFixed(1) }},
              { "data": "rlfmd", render: function ( data, type, row ) {return data.toFixed(1) }},
              { "data": "lnpmi", render: function ( data, type, row ) {return data.toFixed(2) }},
