fix to navbar logic