Fix navbar bug when submenu change