Fix broken initializeNavBar behavior when called a second time.