Adjustments to fix the navigation if additional elements are added to the template.