improve how we determine state of main-nav to work with deep links