diff --git a/templates/base.html b/templates/base.html
index cf31d4d..d92e107 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -376,7 +376,7 @@
                     $("#modal_new_client").modal('hide');
                     toastr.success('Created new client successfully');
                     // Update the home page (clients page) after adding successfully
-                    if (window.location.pathname === "/") {
+                    if (window.location.pathname === "{{.basePath}}/") {
                         populateClient(resp.id);
                     }
                 },