improvements to navbar behavior