popstate event now highlights the correct term in the hierarchy