Fixed a bug in NavBar