Fix some bugs to make the navbar more elegant.