Fix JS navigation if root path of the site is not '/'