Edited logic in the nav bar.