Minor bug fix to nav bar logic