diff --git a/web/html/xui/index.html b/web/html/xui/index.html
index 78aa1c39..75758c5b 100644
--- a/web/html/xui/index.html
+++ b/web/html/xui/index.html
@@ -654,13 +654,13 @@
formattedLogs += ' - ';
if (id.substr(0, 1) === '[') {
- let idColor = idColors[idColorIndex];
if (lastLogId !== '' && lastLogId !== id) {
idColorIndex++;
}
if (idColorIndex >= idColors.length) {
idColorIndex = 0;
}
+ let idColor = idColors[idColorIndex];
lastLogId = id;
formattedLogs += `${id} ${message}`;
} else {